lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Sequeira <>
Subject pre computing possible search results narrowing and hit counts on those
Date Wed, 30 Mar 2005 00:01:16 GMT
I have the above requirement, for which I could not find a good way to do.
I think the best way to explain my problem would be to give an example.

I have documents where each document represents a real estate property
for sale in US.
So, each document would have a city associated with it.
(We index the document and maybe index a city field.)

A user does a search for say "condominium", and i show him the 50,000
properties that meet that description.

I need two other pieces of information for display -
1. I want to show a "select" box on the UI, which contains all the
cities that appear in those 50,000 documents
2. Against each city I want to show the count of matching documents.

For example the drop down might look like
"Los Angeles"  10000
"San Francisco" 5000

(But, I do not want to show "San Jose" if none of the 50,000 documents
contain it)
Now, the user will be able to narrow down the search using one of the
selections (which I can turn into a boolean query).

My problem is, I do not know how to generate that 'select' list
without having to actually access each of those  50,000 documents.


P.S.: The above app is fictional, since my employer won't like it if I
expose the actual stuff I am working on.

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

View raw message