lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
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.




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message