lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JMA" <mrj...@comcast.net>
Subject Terms given a filter?
Date Thu, 15 Sep 2005 09:00:14 GMT

Greetings -

I know I can get all the fields in an index: reader.getFieldNames()
and also all the terms:  reader.terms()

However, I need to be able to get all the terms and fields given a search
filter. For example, say I have an index that has crawled 5000 pdf files
(books) and I have the following fields:

content, author (not tokenized), and publish_date

I can easily find all the *distinct* authors in the index using
'reader.terms()'.  But say I want to list all the *distinct* authors that
have published books in 2002?  I can do a simple search to get all the books
filtered by publish_date:2002.  But then I have to do my own scan of the
results and pull out the author, removing duplicates.

Is there an easier way to do this?

Thanks in advance!

JMA





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


Mime
View raw message