lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: Delete documents base on more than one condition?
Date Thu, 06 Dec 2012 09:29:00 GMT
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.2007@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 <rajashekarpanneti@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-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