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 = ir.termDocs(new
Term(ArtistIndexField.ARTIST_ID.getName(),"4302e264-1cf0-4d1f-aca7-2a6f89e34b36"));
termDocs.next();
assertEquals(1,termDocs.freq());
but this doesnt work
TermDocs termDocs = ir.termDocs(new
Term(ArtistIndexField.ARTIST_ID.getName()));
termDocs.next();
assertEquals(1,termDocs.freq());
which is what I really want, i.e that document has a term for this fieldname
(In any test there is only ever one document)
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org