Hello again!

The missing pivot facet when sorting by index can also be repeated in solr
4.3.1
Does anyone have an idea, how to debug this?

Best regards Johannes

---------- Forwarded message ----------
From: jotpe <jotpe....@gmail.com>
Date: 2013/6/25
Subject: facet.pivot and facet.sort does not work with fq
To: solr-user@lucene.apache.org


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 OK
 
http://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 OK
 
http://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 OK
 
http://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 : failure
 
http://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