Or, easier, just pass the Query identifying the docs to
IndexWriter.deleteDocuments(Query query).  There are variants that
take multiple queries and single or multiple terms.  See the javadocs.


You can't delete docs via IndexReader any more.


--
Ian.


On Thu, Dec 6, 2012 at 9:19 AM, parnab kumar <[email protected]> wrote:
> Hi Rajashekhar,
>
> yet it is possible . You can form a Boolean Query which will match the
> documents as per your required conditions . Then you can delete by the
> respective document ids by instantiating a indexReader.
>
> You can refer to Book Lucene in Action 2nd Edition for more details .
>
> Thanks,
> Parnab
> IIT Kharagpur,India
>
> On Thu, Dec 6, 2012 at 12:30 PM, rajashekar <[email protected]>wrote:
>
>> Hi
>>
>> Is it possible to delete a set of documents where they match certain
>> conditions? I would like to delete a set of articles that belong to a
>> given user within a category.
>>
>> Thanks,
>>
>>
>>
>> -----
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Delete-documents-base-on-more-than-one-condition-tp4024714.html
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to