Filter strategy in Lucene 6.0

2016-07-22 Thread Andres de la Peña
Hi all, Suppose that we have a boolean query composed by two filtering queries, where one of them is fast and the other is slow: BooleanQuery.Builder builder = new BooleanQuery.Builder(); builder.add(fastQuery, FILTER); builder.add(slowQuery, FILTER); Query query = builder.build(); How is the i

RE: MmapDirectory and IndexReader reuse

2016-07-22 Thread Uwe Schindler
Hi, a quick alternative is to get the underlying reader from IndexSearcher. You just don't use the IndexSearcher provided by SearcherManager, you just use it to access the underlying Index-/DirectoryReader, that you can feed into new MultiReaders. The good thing with that is: - Every index has

Re: Doc length nomalization in Lucene LM

2016-07-22 Thread Ahmet Arslan
Hi, Yes, as you discovered, there is some precision loss during the encode/decode process. Ahmet On Friday, July 22, 2016 1:59 PM, Dwaipayan Roy wrote: Thanks for your reply. But I still have some doubts. >From your answer, I think you mean to say that the document length is just saved in

Re: Doc length nomalization in Lucene LM

2016-07-22 Thread Dwaipayan Roy
Thanks for your reply. But I still have some doubts. >From your answer, I think you mean to say that the document length is just saved in byte format for less memory consumption. But while debugging, I found that the doc length, that is passed in score() is 2621.44 where the actual doc length is 2

Re: MmapDirectory and IndexReader reuse

2016-07-22 Thread Vladimir Kotal
On 07/21/16 20:18, Michael McCandless wrote: Can't you pass your own SearcherFactory to SearcherManager to do that? Aha ! That should be possible, thanks. v. - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org

Re: Doc length nomalization in Lucene LM

2016-07-22 Thread Ahmet Arslan
Hi Roy, It is about storing the document length into a byte (to use less memory). Please edit the source code to avoid this encode/decode thing: /** * Encodes the document length in a lossless way */ @Override public long computeNorm(FieldInvertState state) { return state.getLength() - state.getN