It's also entirely possible you're hitting an unexpected case or bug,
where .tryDeleteDocument could have done the delete but failed ... who
knows :)
But infoStream is the next step. It's trivial to turn on, e.g. just
call IndexWriterConfig.setInfoStream(new
PrintStreamInfoStream(System.out)) in
Hello again,
I've been doing some further investigation, and once again, I'm stumped how
we could have had this problem happen in the first place.
I followed up on your mention of "one should not rely on when merges might
happen", which seems like good advice. :) That said...
We're always callin
On Thu, Jan 2, 2014 at 7:53 PM, Derek Lewis wrote:
> Sorry for the delay responding. Holidays and all that. :)
No problem.
> The retry approach did work, our process finished in the end. At some
> point, I suppose we'll just live with the chance this might happen and dump
> a bunch of exceptio
Sorry for the delay responding. Holidays and all that. :)
The retry approach did work, our process finished in the end. At some
point, I suppose we'll just live with the chance this might happen and dump
a bunch of exceptions into the log, if the effort to fix it is too high.
Being pragmatic and
OK I see; so deleting by Term or Query is a no go. I suppose, the
"retry" approach is actually fine: deleting by docID should be so fast
that having to retry if any single docID failed, is probably still
plenty fast. Out of curiosity, if you have the numbers handy, how
much time does it take to d
I'll see if I can explain the scenario a bit simpler in a moment, but
there's one other thing I thought worth mentioning.
I'm not sure it's possible for me to fall back to Term/Query deleting.
Basically, if there are two documents in the index that have the same
serialId, it's as the result of the
I couldn't quite follow the scenario ... but if there's any chance a
merge could run in that IndexWriter it can lead to this. Could it
just be a merge that was running already at the start of your deletion
process?
Maybe turn on IndexWriter's infoStream to see what merges are kicking off?
Really
Hi Mike,
Thanks for the response. I realize that merging could cause segments to be
deleted, resulting in tryDeleteDocument returning false. However, I've
been unable to figure out why the scenario I've described would cause
segments to be merged. I've tried duplicating it by writing indexes wi
tryDeleteDocument will return false if the IndexReader is "stale",
i.e. the segment that contains the docID you are trying to delete has
been merged by IndexWriter.
In this case you need to fallback to deleting by Term/Query.
Mike McCandless
http://blog.mikemccandless.com
On Fri, Dec 20, 2013
Hello,
I have a problem where IndexWriter.tryDeleteDocument is returning false
unexpectedly. Unfortunately, it's in production, on indexes that have
since been merged and shunted around all over, and I've been unable to
create a scenario that duplicates the problem in any development
environments
10 matches
Mail list logo