lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Querying the Query object
Date Fri, 05 Oct 2007 23:03:03 GMT

: Is there any way to find out if an instance of Query has any terms within it?
: I have a custom parser (QueryParser does not do everything I need) and it
: somtimes creates empty BooleanQuerys. (This happens as a side effect of

so you're problem is not "does a Query have any terms in it" it's "does a 
BooleanQuery have any clauses in it?" ... booleanQuery.clauses().size() 
will answer that question for you.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message