You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Shawn Konopinsky <sk...@blueprint.org> on 2004/07/19 19:01:23 UTC

Limiting a unqiue field search.

I am attempting to query a field in my index for all unique values. I am
using the following call to get all the unique values of the field:

TermEnum enumerator = reader.terms(new Term(field, ""));

where read is an IndexReader and 'field' is the field name. 

However, I would like further limit this by putting another constraint
in to limit the unique values to those who have a certain value in
another field. An exmaple would be to get 'the unique values of field1'
where 'field2 = true'.

Can anyone offer any advice how to best approach this problem?

Best Regards,
Shawn.


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org