lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: document ID and performance
Date Tue, 16 Nov 2004 14:45:53 GMT
Yan Pujante wrote:
> I want to run a very fast search that simply returns the matching 
> document id. Is there any way to associate the document id returned in 
> the hit collector to the internal document ID stored in the index ? 
> Anybody has any idea how to do that ? Ideally you would want to be able 
> to write something like this:
>     document.add(Field.ID(documentID));
> and then in the HitCollector API:
> collect(String documentID, float score) with the documentID being the 
> one you stored (but which would be returned very efficiently)

Have a look at:

In your HitCollector, access an array, from the field cache, that maps 
Lucene ids to your ids.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message