Hi all,
Has anyone been through this issue?
I have documents that have one or more values for the same field. For example:
doc1 = new Document();
doc1.add(new Field("Letter"), "A", ...);
doc1.add(new Field("Letter"), "C", ...);
// doc1.add(other fields);
//write to index
Now I add another document:
doc2 = new Document();
doc2.add(new Field("Letter"), "B", ...);
//...
//write to index
Now, when I query, sorting by "Letter" field, doc2 will return before
doc1. I think it is sorting by the last value added to the field
(therefore, B precedes C), but I cannot make any assumptions on the
order that I add the fields to my documents.
Is there a way to handle the sorting within a document as well,
instead of only among different documents? I wanted doc1 to be sorted
as if its "Letter" was "A" (lexicographic order).
Thanks,
Andre
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]