Is there a way to get facet counts based on a substring of a facet field, akin to an EdgeNGram?
I'm using solr to store geohash strings at a high precision, and want to count the number of documents at a certain geohash precision. Facets are used to count documents in a specific geohash 'cell'.
At the moment, the only way I can see to do this is using tiers of geohashes.
eg. Current facet result set (from the indexed data):
<lst name="facet_counts">
<lst name="facet_fields">
<int name="svztdm7w">11</int>
<int name="sv87rzt8">3</int>
<int name="sv83t6bf">2</int>
<int name="syqxp43m">4</int>
<int name="syr9f0v2">4</int>
<int name="syp8p8hb">3</int>
<int name="tuuttmtt">3</int>
<int name="twj1ynm3">3</int>
<int name="w30n6u71">3</int>
</lst>
</lst>
What I want at precision 1 setting:
<int name="s">27</int>
<int name="t">6</int>
<int name="w">3</int>
What I want at precision 2 setting:
<int name="sv">16</int>
<int name="sy">11</int>
<int name="tu">3</int>
<int name="tw">3</int>
<int name="w3">3</int>
Cheers.