lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: [jira] Commented: (SOLR-44) Basic Facet Count support
Date Fri, 01 Sep 2006 18:38:18 GMT
: Following up with what the ideal faceted browsing info might look like
: (ignoring how label info is obtained for the moment):
: - include grouping and group labels
: - include constraint label, count, and the exact query needed to
: filter by the constraint
: - have the same structure regardless of faceting type (by field or by
: query constraints)
: - be relatively compact, while being easy for clients to manipulate

Compact is fine, but if we're going to try and have a general, reusable,
structure -i'd rather it be flexible.  there's a lot of other information
that people might want to return as part of a "robust" faceting system.

With product data at CNET, we have things like the "display type" for
differnet facets (ie: always display these constraints in order of count,
display in Label order, display top N by count, but then sort by Label,
etc...), for numeric facets we also have the "rank direction" which tells
the front end wether lower values are better or wrose then high values
(ie: lower prices are better then high prices, but high hard disk sizes
are better then low disk sizes).

At the individual constraint level other information can be useful as
well: in some situations it's useful to know not only the count of
matching results that meets the constraint, but the total number of
results in the index that meets the constraint (or ranking constraints by
ratio instead of by count)

So if we really want to come up with an output structure that can grow
beyond "simple" facets, we should keep that in mind, something like...


 <lst name="facets">
   <lst name="cat">
     <str name="facetType">field</str>
     <str name="label">Category</str>
     <lst name="constriants">
       <lst name="music">
         <int name="count">24</int>
         <str name="label">Music</str>
         <str name="query">cat:music</str>
       </lst>
       <lst name="electronics">
         <int name="count">36</int>
         <str name="label">Electronics</str>
         <str name="query">cat:electronics</str>
       </lst>
       ...
     </lst>
   </lst>
   <lst name="foo">
     <str name="facetType">custom_crazy_type</str>
     <str name="label">Foo</str>
     <lst name="constraints">
       <lst name="someIdMaybe">
         <str name="who_knows_what">arbitrary data</str>
         <int name="count">142</int>
       </lst>
       ...
     </lst>
   </lst>
 </lst>




-Hoss


Mime
View raw message