You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Dewi Wahyuni <de...@qut.edu.au> on 2012/09/11 05:42:12 UTC

Facet Sort by Index, missing indexes

Hi

I have a multiple valued field , "a" in my Solr index. Values are  strings like : "l1:1","l2:1","l3:1" and so on.
I am using the field as facet, and therefore uses these parameters along with other facet fields (for example "b"):
Facet=true&facet.field=a&facet.field=b&facet.sort=count&f.a.facet.mincount=1&f.a.facet.sort=index

I did the query twice, once with the sorting and once without the sort:

1.       Without f.a.facet.sort=index : I have all l1, l2, l3 in count order (all l1, l2,  and l3 facets have counts on them)

2.       With f.a.facet.sort=index : The facet is sorted accordingly "l1:..","l2:.." but "l3" facets are completely missing

Does anyone know if I am missing a parameter or have encountered similar situation?
Solr Version: 3.6.1

Thank you
Dewi






RE: Facet Sort by Index, missing indexes

Posted by Dewi Wahyuni <de...@qut.edu.au>.
Hi Chris,

Thanks for that tip, I checked and it is correctly because of the constraint limit.

Thanks  again
Dewi
 
-----Original Message-----
From: Chris Hostetter [mailto:hossman_lucene@fucit.org] 
Sent: Wednesday, 12 September 2012 1:57 AM
To: solr-user@lucene.apache.org
Subject: Re: Facet Sort by Index, missing indexes


: I did the query twice, once with the sorting and once without the sort:
: 
: 1.  Without f.a.facet.sort=index : I have all l1, l2, l3 in count order
: (all l1, l2, and l3 facets have counts on them)
: 
: 2.  With f.a.facet.sort=index : The facet is sorted accordingly
: "l1:..","l2:.." but "l3" facets are completely missing

first off: terminology clariication.  It sounds like in your case you have a "field" named "a" and you are using that field as a "field facet". 
 within the field "a" you have "terms" like l1, l2, l3, etc...  when you facet on a field, the terms are each treated as a "constraint" and you get a "constraint count" (or "facet count") for each term.


Having said that: it sounds like what you are describing is that some "constraints" are missing from the list when you use facet.sort=index (ie: 
when the constraints are in "index" order)

Is your example real? ie: are the terms really "l1", "l2", and "l3" or are those just hypothetical examples?  how many terms do you see in the response? - because by default a max of 100 constraints are returned...

https://wiki.apache.org/solr/SimpleFacetParameters#facet.limit

It would help if you could provide a full, real example of the request you are attempting (with all params) and the actaul response you get back - if things appaer to be working with facet.sort=count, but not with facet.sort=index, then please show us both requests+responses so we can compare.




-Hoss

Re: Facet Sort by Index, missing indexes

Posted by Chris Hostetter <ho...@fucit.org>.
: I did the query twice, once with the sorting and once without the sort:
: 
: 1.  Without f.a.facet.sort=index : I have all l1, l2, l3 in count order 
: (all l1, l2, and l3 facets have counts on them)
: 
: 2.  With f.a.facet.sort=index : The facet is sorted accordingly 
: "l1:..","l2:.." but "l3" facets are completely missing

first off: terminology clariication.  It sounds like in your case you have 
a "field" named "a" and you are using that field as a "field facet". 
 within the field "a" you have "terms" like l1, l2, l3, etc...  when you 
facet on a field, the terms are each treated as a "constraint" and you get 
a "constraint count" (or "facet count") for each term.


Having said that: it sounds like what you are describing is that some 
"constraints" are missing from the list when you use facet.sort=index (ie: 
when the constraints are in "index" order)

Is your example real? ie: are the terms really "l1", "l2", and "l3" or are 
those just hypothetical examples?  how many terms do you see in the 
response? - because by default a max of 100 constraints are returned...

https://wiki.apache.org/solr/SimpleFacetParameters#facet.limit

It would help if you could provide a full, real example of the request you 
are attempting (with all params) and the actaul response you get back - if 
things appaer to be working with facet.sort=count, but not with 
facet.sort=index, then please show us both requests+responses so we can 
compare.




-Hoss