TextField is dangerous: it is analyzed, possible into more then one
token, and then your deletes won't work. It's safer to use
StringField for tokens you later want to delete by.
Try making a standalone test that just deletes documents first...
You don't need to iw.commit to make commits visible
Yes that all looks reasonable. Maybe there is a mismatch in the
analysis chain? I'm just throwing out wild guesses because I don't
really see any problems in what you shared. Also - if the problem
really has something to do with ControlledRealTimeReopenThread, I'm not
going to have the answe
Thanks for your reply!
I try to delete documents using a term that matches a Document TextField:
private static final String NAME = "name";
private void store(String n, ... other fields ...) {
Document d = new Document();
d.add(new TextField(NAME, n, Field.Store.YES));
... add ot
It's impossible to tell since you didn't include the code for it, but my
advice would be to look at how the documents are being marked for
deletion. What are the terms being used to delete them? Are you trying
to use lucene docids?
-Mike
On 12/1/2014 4:22 PM, Badano Andrea wrote:
Hello,
M