Hi,

You know the level your currently in:

America/USA

You have the values for the location facet in the form:

America/USA/NYC/Chelsea...................................3
America/USA/NYC/East Village............................2
America/USA/San Francisco/Haight-Ashbury.......5
America/USA/Los Angeles/Hollywood..................1

Why can't you do the following:

first step: translate each facet value to the next expected level, that is:

America/USA/NYC.................................................3
America/USA/NYC.................................................2
America/USA/San Francisco.................................5
America/USA/Los Angeles.....................................1

(this can easily be done using regular expression)

second step: aggregate the counts for similar values:

America/USA/NYC.................................................5
America/USA/San Francisco.................................5
America/USA/Los Angeles.....................................1

now, use the last "part" of the value path as display name, and use the whole value path as a filter (with a wildcard of course).

You can also have a look at this issue: http://issues.apache.org/jira/browse/SOLR-64

cheers,
Uri

clico wrote:
Hello

I'm looking for a way to do that

I have a hierachical facet

ex : Continent / Country / City / Blok


Europe/France/Paris/Saint Michel
America/USA/NYC/Chelsea
etc ...

I have some points of interest tagged in differents level of a same tree
ex : some POI can be tagged Saint Michel and other tagged Paris etc ...

I facet on a fiel "location". This i a fiel stored like this
Continent/Country/City/Blok



I want to drill down on this facet during the search and show the facets for
the next level of a level


Ex :

When I search at the level continent I want to facet the level Europe, USA
etc ...
and to show all the results (Europe contains POI tagged as Europe and POI
tagged as France for example)



I know I can make a facet query
something like Europe/France/* to search all POI in France
but how can I show the facet level under France (Paris, Lyon etc ...) ???


Thank u

Reply via email to