lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy <angelf...@yahoo.com>
Subject Implementing hierarchical facet
Date Tue, 02 Mar 2010 02:23:51 GMT
I read that a simple way to implement hierarchical facet is to concatenate strings with a separator.
Something like "level1>level2>level3" with ">" as the separator.

A problem with this approach is that the number of facet values will greatly increase.

For example I have a facet "Location" with the hierarchy country>state>city. Using the
above approach every single city will lead to a separate facet value. With tens of thousands
of cities in the world the response from Solr will be huge. And then on the client side I'd
have to loop through all the facet values and combine those with the same country into a single
value.

Ideally Solr would be "aware" of the hierarchy structure and send back responses accordingly.
So at level 1 Solr will send back facet values based on country (100 or so values). Level
2 the facet values will be based on the states within the selected country (a few dozen values).
Next level will be cities within that state. and so on.

Is it possible to implement hierarchical facet this way using Solr?



      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message