3
votes

I want to be able to find counts of terms within a lucene query. For example, I have two fields, one is location and another is category. If I run a query to get all documents in "Los Angeles, CA" I would then want to be able to quickly see for those documents what the categories were. I know solr does this sort of thing with faceting, but I am hoping to do this with plain old Lucene. Right now I am looping through all doc id and then using a hashtable to count up the terms, but it is very slow.

A way to get a termenum but have it restricted to my query would be ideal.

1

1 Answers

1
votes

Right now I'm working on something similar for the framework we are using.

I gathered a few ressources describing the problem and the solution here: http://code.google.com/p/gtxcontentconnector/issues/detail?id=41