lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AdrianPillinger <>
Subject Can I filter the results returned by IndexReader.terms(term)?
Date Wed, 03 Sep 2008 15:54:11 GMT

I am using IndexReader.terms(term) to produce term suggestions to my users as
they type. In many cases the user is searching lucene with a filter applied,
for example a date range. 

Is there any way I can get a list of terms in the index that are contained
within a subset of the documents by a given filter.

i.e. I'd like to do something like....

IndexReader reader = readerProvider.openReader(directoryProvider);
TermEnum termEnum = reader.terms(new Term("name", "<user entered term>"));
...Iterate on terms

I've scouted all over the API and I cannot find how to do this or if it is

Please let me know if it can be done and if so how.


View this message in context:
Sent from the Lucene - Java Developer mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message