lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Lee <ag...@earthlink.net>
Subject Re: Do you believe in Clause sanity?
Date Thu, 13 Oct 2005 21:21:39 GMT
Oops, I'm confusing libraries.  I meant I want to remove a Nutch  
Clause from a Nutch Query.

--Andy

On Oct 13, 2005, at 4:45 PM, Andy Lee wrote:

> The API for BooleanQuery only seems to allow adding clauses.  The  
> nearest way I can see to *remove* a clause is by laboriously  
> constructing a new BooleanQuery (assuming you aren't absolutely  
> tied to the original instance) and adding all the clauses from the  
> original query except the one you're removing.  And *that's* rather  
> cumbersome because you can't actually add a clause; you have to use  
> one of the addRequired-/addProhibited- methods -- and they take  
> arrays of String rather than the array of Term that you can get  
> from a Clause.
>
> It seems reasonable to me to want to remove clauses from a query.   
> Is there some reasonable way of doing this that I'm missing?
>
> --Andy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


---------------------------------------------------------------------
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