I want to find the number of terms in a lucene query. For example, I have two fields: one is the location, and the other is the category. If I ran a query to get all the documents in Los Angeles, California, I would like you to be able to quickly look through these documents, what the categories were. I know that solr does this with faceting, but I hope to do it with the plain old Lucene. Right now I am looking through all the doc id and then using a hash table to count the terms, but this is very slow.
You can get the perfect way to get a terminal, but limit it to a request.
source
share