On Jan 5, 2010, at 7:44 AM, Paul Taylor wrote:
> So currently in my index I index and store a number of small fields, I need
> both so I can search on the fields, then I use the stored versions to
> generate the output document (which is either an XML or JSON representation),
> because I read
I think you're looking for
IndexReader.terms(new Term(ArtistIndexField.ARTIST_ID.getName(), ""));
NOTE: the empty string is important. You're effectively positioning
your TermEnum at the first term in the index.
This works in your case without much checking since there
is exactly one document in
This is a good question...
Merging will not alter the previously stored fields -- it will just
carry them forward to the next segment.
So any docs that have stored fields will retain them through merging.
(And, yes, merging is done "under the hood", separately from "indexing").
This is in contr
Simon Willnauer wrote:
Would indexReader#termDocs() help? You get all docs containing a
specific term - that way you could iterate in reverse order though.
simon
Thanks, almost if I do this I can determine that a document exists with
a term with a particular value works
TermDocs termDocs =