lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: List of queries from the queryparser
Date Mon, 19 May 2003 16:46:05 GMT
G√ľnter Kukies wrote:
> is it possible to get a list of subqueries(array of query-objects) after a queraparser
has done parsing?

You could try something like:

   BooleanClause[] subQueries;
   if (query instanceof BooleanQuery) {
     subQueries = ((BooleanQuery)query).getClauses();
   } else {
     subQueries =
       new BooleanClause[1] { new BooleanClause(query, true, false) }
   }

Doug


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


Mime
View raw message