lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abu Abdulla alhanbali" <mont...@gmail.com>
Subject Re: Deleting the result from a query or a filter and not a documents specified by Term
Date Sun, 19 Aug 2007 07:51:00 GMT
Greatly appreciated.
It works perfect.

On 8/19/07, Chris Hostetter <hossman_lucene@fucit.org> wrote:
>
> : Is there a way to delete the results from a query or a filter and not
> : documents specified by Term. I have seen some explanations here but i do
> not
> : know how to do it:
> :
> :
> http://www.nabble.com/Batch-deletions-of-Records-from-index-tf615674.html#a1644740
>
> the simplest approach that will work in a general case:
>   1) build you query object
>   2) call rewrite on your query
>   3) call extractTerms on the rewritten query
>   4) iterate over all those terms and delete.
>
> if you have Filter it's even easier...
>   1) call the bits method on your filter
>   2) iterate over each bit and call the delete method that takes a docid.
>
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message