Lucene first filters, then scores results, then returns those matches, with scores. Without rewriting portions of Lucene, this cannot, as I understand it, be done in the form you are asking.
The simplest way that occurs to me is to add a match-all clause to your query with a very low boost (0.0000001), if the resultant score is the same as that value, you can be sure it did not match your other clauses. Dunno if that works for you. This question is probably better suited to the Java-user list where more of the right people are likely to be listening. Upayavira On Tue, May 12, 2015, at 11:27 AM, Susrutha Gongalla wrote: > Hello, > > I am developing a matching algorithm using Lucene 4.10.0 > My index consists of about 2000 documents. > When I use the 'search' method on a query term, I get about n results > that > point to the n documents in index along with their corresponding scores. > What I would like to get is - All the 2000 documents with their lucene > scores along with whether they are matched/unmatched. > I would like to control the size of results that lucene returns when I > search for a query term. > > I have tried altering the default similarity used in lucene by overriding > the score methods. > However, this did not affect the size of results generated by lucene. > > I also tried explicitly given 'null' value for filter, when calling the > 'search' method. > This also did not affect the size of results. > > I just started working with Lucene. > Would appreciate any help in this regard! > > Best, > Susrutha Gongalla
