On Apr 27, 2008, at 7:50 AM, Thijs Vonk wrote:
What is the best way to get the unique terms from a field in a result?
I've been using SimpleFacet to do this. However, I don't need the
counts, so it seems overkill to have to iterate over all the result
documents per field to get the unique values for that field.
The field's contain database Id's that I use on the client side to
get aditional information from the database.
Is there a faster way to get the unique values from a field in a
result?
If you are looking for the unique terms for a field across all
documents, faceting is the way to go. The counts are stored in the
index, so i don't think that is a substantial loss.
If you are looking for the unique terms within a document (I doubt you
are, but not totally clear from your question) perhaps you could store
the unique terms?
ryan