开发者

lucene query's term documents

开发者 https://www.devze.com 2023-01-30 16:32 出处:网络
im beginer with lucene, i tried without success find the class that return for each term in a query the relevant documents array

im beginer with lucene, i tried without success find the class that return for each term in a query the relevant documents array

to be more accurate, where can i find the code that decide if document is relevant or not for a given query

i will be grate开发者_JAVA百科ful for guiding


The problem with results is that Lucene collects not all, but only N top results (N is set by you). And this is a good idea, since it reduces time for search process heavily, yielding only results you may be interested. Though you can set N to some very big number, make one search for each term in query and then combine results, I actually do not recommend doing this.

On the other hand, You can combine your terms before searching, not after. I'm not familiar with zig-zag join, but most probably you'll have to create new syntax for query and force QueryParser use your ZigZagQuery (or whatever you call it). For examples of implementation see Query subclasses source code.

0

精彩评论

暂无评论...
验证码 换一张
取 消