This problem is solved.
Queue is OK in multi-thread.
Lucene searcher is OK in multi-thread.
Hoss as saying the problem was found while demonstrate testing.
My method had the problem.
Thanks to helpers.
2014-07-10 11:05 GMT+09:00 Chris Hostetter :
>
> : 4. Syncronized searcher.doc method call
: 4. Syncronized searcher.doc method call in multi-thread(like this: public
: synchronized Document getValue( IndexSearcher searcher, int docId ) {
: return searcher.doc( docId ); })
: ==> every execution is same.
:but If I use this method, It is no difference with single thread
:
Thanks answer Ian
I more check this problem..(Lucene 4.8.1)
1. acceptsDocsOutOfOrder() return false
==> ineffective
2. acceptsDocsOutOfOrder() return true
==> ineffective
3. ConncurrentLinkedQueue add() and poll() methods check value in
multi-thread
==> the queue is no problem.
4.
It's more likely to be a demonstration that concurrent programming is
hard, results often hard to predict and debugging very hard.
Or perhaps you simply need to add acceptsDocsOutOfOrder() to your
collector, returning false.
Either way, hard to see any evidence of a thread-safety problem in lucen