lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enrique Lamas" <enrique.la...@corp.ya.com>
Subject Re: How do I obtain the document id in order to delete from index?
Date Mon, 30 Oct 2006 10:45:01 GMT
I think I found it.

I must do a query an then loop through the hits to obtain the id with 
hit.id(int n).

If anyone knows any better way...

Thanks


----- Original Message ----- 
From: "Enrique Lamas" <enrique.lamas@corp.ya.com>
To: <java-user@lucene.apache.org>
Sent: Monday, October 30, 2006 11:39 AM
Subject: How do I obtain the document id in order to delete from index?


Hi,
I've been reading Lucene documentation and I see there are two ways of 
deleting a document from an index: by id and by term.

Supose I have an index with three fields: field1, field2 and field3, and I 
want to delete all documents with field1=value1 and field2=value2.
I think I must use deletion by Id, but I don't know how to obtain the Id of 
the documents I want to delete.

Thanks 


---------------------------------------------------------------------
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