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 <parnab.2...@gmail.com> 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 <rajashekarpann...@yahoo.in>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: java-user-unsubscr...@lucene.apache.org
>> For additional commands, e-mail: java-user-h...@lucene.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to