Antony Bowesman wrote:
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.
Ahh right, my short term memory failed me ;) I now remember this
thread.
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
Yes, though LUCENE-1231 (column stride stored fields) should help this.
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 :(
Yeah... payloads don't require/expect that each term would be unique
in the field, so in general we have to access it via TermPositions API.
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]