lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] Updated: (SOLR-44) Basic Facet Count support
Date Sun, 03 Sep 2006 23:26:22 GMT
     [ ]

Hoss Man updated SOLR-44:

    Attachment: simple-facets.patch

Per more mailing list discusion, a new version of the patch...

1) param names have changed to match conventions disccuessed about highlighting...

facet - boolean - do facet counts or not
facet.query - multival string - list of arbitrary query constraints to count
facet.field - multival string - list of fields to treat as facets
facet.missing - boolean, per field - count docs that have no value for field
facet.zeros - boolean, per field - include facet field values with 0 counts
facet.limit - int, per field - max number of field values to return (desc)

2) note that previuosly TODO "limit" and "zeros" functionality has been added

3) note addition of "missing" option per discussion on the list

4) response format has been modified slightly (not as extensively as discussed on the list
since there wasn't a clear concensus about a good API - but a cleaner seperation of query
based facets and facet fields)

5) heavy refactoring: all functionality put into a "SimpleFacets" class which can be subclasseed/composed
to get individual pieces of functionality.  usage of this class by StandardRequestHandler
also refactored into method that subclassing handlers can override (to add complex facet behavior
without giving up other built in goodness of StandardRequestHandler)

A cool example that demonstrates everything with the example schema/docs...


(NOTE: this is all still just used in StandardRequestHandler - not DisMax yet)

> Basic Facet Count support
> -------------------------
>                 Key: SOLR-44
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Hoss Man
>         Assigned To: Hoss Man
>         Attachments: simple-facets.patch, simple-facets.patch
> First pass at basic facet support.  initial patch includes utilities for use in RequestHandlers,
and usage in StandardRequestHandler (DisMax should use SolrParams before attempting to add
> Basic idea is that:
>   * facet=true indicates facet counts are desired.
>   * facetField=inStock indicates we want a count of the matching docs for each value
in the field inStock
>   * facetQuery=title:ipod indicates we want the count of matching docs also in the set
of docs matching query title:ipod
>   * if user wants to apply a facet constraint on subsequent queries, they can add an
"fq" (filter query) param (support for this was added to StandardRequestHandler as well)
> Things marked TODO...
>   * add support for per field facetLimit indicating that only the top N items in each
facetField should be returned
>   * add support for a per field facetZero boolean indicating that there is no reason
to bother returning counts of 0 for facetFields (some clients may want to know the list, others
don't care)
>   * potential optimization when using faceLimit to cache the terms with the highest docFreq
and see if they provide all the info we need without doing a full TermEnum
> I'd like to get some feedback on the overall appraoch and params before i proceed too
much farther.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message