On 3-Aug-07, at 8:38 AM, Andrew Nagy wrote:
Hello, I was wondering if there is a way to facet on certain
characters of a field. For example, I would like to get a facet
count on how many of my titles start with the letter A, B, C, etc.
Is this possible with SOLR?
Will's solution is the most performant, but you can also issue a
series of facet queries:
?
q=...&facet.query=title:a*&facet.query=title:b*&facet.query=title:c*&...
Now, if this doesn't have to be query-specific (you want the global
counts), you can use TermDocs to get the answer quickly.
-MIke