Am working on a store search API using Lucene.

I need to show store search results for each City,State combination with its
frequency in brackets....for example:

Los Angles,CA (450) Atlant,GA (212) Boston, MA (78) . . .

As of now, my search results return around 7000 lucene documents on an
average if the user says "Show me all the stores". In this use case, I end
up showing around 800 unique City,State records as shown above.

Am overriding HitCollector class's Collect method and retrieving vectors as
follows: var vectors = _reader.GetTermFreqVectors(doc); Then I iterate
through this collection and calculate the frequency for each unique
City,State combination.

But this is turning out to be very very slow in performance...is there any
better way of grouping search results and calculating frequency in Lucene?
Code snippet would be very helpful

Also,please suggest me if i can optimize my Lucene search code using any
other techniques/tips....

Thanks for reading!

-- 
View this message in context: 
http://www.nabble.com/Grouping-Lucene-search-results-and-calculating-frequency-by-category-tp22997958p22997958.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to