Hi all,
I am trying to access document lenght statistics of the documents that do not 
contain a given term.
I have written following piece of code

BooleanQuery.Builder builder = new BooleanQuery.Builder();builder.add(new 
MatchAllDocsQuery(), BooleanClause.Occur.MUST)        .add(new TermQuery(term), 
ScoreDoc[] hits = searcher.search(new ConstantScoreQuery(builder.build()), 
Javadoc says FILTER is like MUST except that these clauses do not participate 
in scoring.
I was expecting FILTER behaves like MUST_NO, no? (FILTER-clause is excluded 
from the result set)

Also, to disable scoring altogether, is it enough to wrap final boolean query 
using ConstantQuery?Or individual clauses should be wrapped to?
MatchAllDocsQuery is already ConstantQuery, right?

Reply via email to