lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shaun Senecal <ssenecal.w...@gmail.com>
Subject rewrite()ing BooleanQuery results in empty clauses
Date Wed, 04 Nov 2009 08:28:18 GMT
I am rewriting some BooleanQueries and the end result contains some empty
queries.

The initial query is of the form: Field1:foo* Field2:foo* Field3:foo*
Field4:foo* Field5:foo* Field6:foo*

The rewritten query is of the form: ConstantScore(Field1:foo*)
ConstantScore(Field2:foo*) ConstantScore(QueryWrapperFilter())
ConstantScore(QueryWrapperFilter()) ConstantScore(QueryWrapperFilter())
ConstantScore(QueryWrapperFilter())

The thing is, the BooleanQueries contained in the QueryWrapperFilter()s have
no clauses present.  Would this affect the performance of the query at all?
Is there a way I can prevent empty queries like these from being written if
there is a performance penalty?


Shaun

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message