Hello

I'm trying to display a hierachical structur with a facet.pivot, which
should be sorted by index.
I followed the idea
fromhttp://wiki.apache.org/solr/HierarchicalFaceting#Pivot_Facets and
created
"path_levelX" fields from 0 to 7.

My tokens are not unique per level and i need to sort it like in the
original structure. So i added a prefix with a sortorder number with static
length and an unique id (always 8 nums). Later this prefix will be hide by
using substring.
Format: SORTORDER/UNIQUE_ID/NAME_TO_DISPLAY

example:
path_level0:"000/123/Chief"
path_level0:"000/123/Chief"  path_level1:"000/124/Staff"
path_level0:"000/123/Chief"  path_level1:"000/124/Staff"
path_level2:"00/125/Chief"
path_level0:"001/126/Legal Adviser"


Displaying the pivot works fine.

Sorted by count
OKhttp://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=count
Sorted by index
OKhttp://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=index


Now I must reduce my global structure to one office by using the fq
parameter.

Reduced to one office, sorted by count
OKhttp://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=count&fq=office:xyz
Reduced to one office, sorted by index :
failurehttp://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=count&fq=office:xyz

The facet.pivot elements stays empty. So what is wrong?
<lst name="facet_pivot"><arr
name="path_level1,path_level2,path_level3"/></lst>


Maybe this is a bug... On the other hand, maybe this is a bad way to obtain
a hierchacial structure with a custom sort. Better ideas?

Best regards Johannes

Reply via email to