lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
Subject Re: Can TermDocs.skipTo() go backwards
Date Wed, 27 Aug 2008 21:19:14 GMT
Michael McCandless wrote:
> 
> TermDocs.skipTo() only moves forwards.
> 
> Can you use a stored field to retrieve this information, or do you 
> really need to store it per-term-occurrence in your docs?

I discussed my use case with Doron earlier and there were two options, either to 
use payloads or stored fields.  With the payload case, for a single field 
(owner) in a document there are multiple unique terms (ownerId), each with a 
payload (access Id).

Using stored fields I have to store something like

ownerId:accessId
ownerId:accessId
ownerId:accessId

then fetch the stored field for the document and then find the particular 
accessId for the owner I am searching for.

I was testing the performance implications of each as I understand fetching 
stored fields is not optimal and the payload scenario is logically a better fit, 
as every owner will have a different accessId for every Document.

What would fit my usage would be something like

byte[] b = doc.getPayload("owner", ownerId);

where for the given OID, I can retrieve the payload I associated with it, when I did

doc.add(new Field("owner", ownerId, accessPayload);

but that's not how it works :(

Antony



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