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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to