After a bit more investigating, it appears that any facet tree where the first
item is numerical or boolean or some non-textual type does not produce any
secondary facets.  This includes sint, sfloat, boolean and such.

For instance, on the sample index:

  facet.tree=sku,cat => works
  facet.tree=cat,sku => works
  facet.tree=manu_exact,cat => works
  facet.tree=cat,manu_exact => works
  facet.tree=popularity,inStock => fails
  facet.tree=inStock,popularity => fails
  facet.tree=manu_exact,weight => works
  facet.tree=weight,manu_exact => fails

I'm not very familiar with the Solr / Lucene Java API, so this is slow going
here.  Maybe I'm barking up the wrong tree, but is the TermQuery for the
secondary SimpleFacet messing up some how?  I tried to dig into the code, but
was unsuccessful.  

It appears to me that the searcher never returns a docSet for any TermQuery
where the field being searched has a type that is non-textual. 

As a final test, I changed the schema and made the inStock field a 'text' field
instead of 'boolean'.  When I did that, and reindexed the sample data then the
tree facet would work correctly as either facet.tree=cat,inStock or
facet.tree=inStock,cat.  Whereas before it would only work in the former. 

enjoy,

-jeremy

On Thu, Oct 16, 2008 at 10:55:49AM -0600, Jeremy Hinegardner wrote:
> Erik,
> 
> After some more experiments, I can get it to perform incorrectly using the
> sample solr data.
> 
> The example query from SOLR-792 ticket:
>   
> http://localhost:8983/solr/select?q=*:*&rows=0&facet=on&facet.field=cat&facet.tree=cat,inStock&wt=json&indent=on
> 
> Make a few altertions to the query:
> 
> 1) swap the tree order - all tree facets are 0
>   
> http://localhost:8983/solr/select?q=*:*&rows=0&facet=on&facet.field=cat&facet.tree=inStock,cat&wt=json&indent=on
> 
> 2) swap tree order and change facet.field to be the primary( inStock )
>   
> http://localhost:8983/solr/select?q=*:*&rows=0&facet=on&facet.field=inStock&facet.tree=inStock,cat&wt=json&indent=on
> 
> Also, can tree faceting work distributed?
> 
> enjoy,
> 
> -jeremy
> 
> On Wed, Oct 15, 2008 at 05:41:21PM -0700, Erik Hatcher wrote:
> > Jeremy,
> >
> > What's the full request you're making to Solr?
> >
> > Do you get values when you facet normally on date_id and type?  
> > &facet.field=date_id&facet.field=type
> >
> >     Erik
> >
> > p.s. this e-mail is not on the list (on a hotel net connection blocking 
> > outgoing mail) - feel free to reply to this back on the list though.
> >
> > On Oct 15, 2008, at 5:29 PM, Jeremy Hinegardner wrote:
> >
> >> Hi all,
> >>
> >> I'm testing out using the Tree Faceting Component (SOLR-792) on top of 
> >> Solr 1.3.
> >>
> >> It looks like it would do exactly what I want, but something is not 
> >> working
> >> correctly with my schema.  When I use the example schema, it works just 
> >> fine,
> >> but I swap out the example schema's and example index and then put in my 
> >> index
> >> and and schema,  tree facet does not work.
> >>
> >> Both of the fields I want to facet can be faceted individually, but when I 
> >> say
> >> facet.tree=date_id,type then all of the values are 0.
> >>
> >> Does anyone have any ideas on where I should start looking ?
> >>
> >> enjoy,
> >>
> >> -jeremy
> >>
> >> -- 
> >> ========================================================================
> >> Jeremy Hinegardner                              [EMAIL PROTECTED]
> >
> 
> -- 
> ========================================================================
>  Jeremy Hinegardner                              [EMAIL PROTECTED] 
> 

-- 
========================================================================
 Jeremy Hinegardner                              [EMAIL PROTECTED] 

Reply via email to