lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan McKinley (JIRA)" <j...@apache.org>
Subject [jira] Updated: (SOLR-792) Tree Faceting Component
Date Thu, 09 Sep 2010 05:17:47 GMT

     [ https://issues.apache.org/jira/browse/SOLR-792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ryan McKinley updated SOLR-792:
-------------------------------

    Attachment: SOLR-792-PivotFaceting.patch

Here is a patch that allows for deeper nesting and more info is stored.  This creates output
that looks like:

http://localhost:8983/solr/select?q=*:*&facet.pivot=cat,popularity,inStock&facet.pivot=popularity,cat&facet=true&facet.field=cat&facet.limit=5&rows=0&wt=json&indent=true&facet.pivot.mincount=0
{code:javascript}
    "facet_pivot":{
      "cat,popularity,inStock":[{
          "field":"cat",
          "value":"electronics",
          "count":17,
          "pivot":[{
              "field":"popularity",
              "value":"6",
              "count":5,
              "pivot":[{
                  "field":"inStock",
                  "value":"true",
                  "count":5}]},
            {
              "field":"popularity",
              "value":"7",
              "count":5,
              "pivot":[{
                  "field":"inStock",
                  "value":"true",
                  "count":3},
                {
                  "field":"inStock",
                  "value":"false",
                  "count":2}]},
            {
...
{code}

and:

{code:xml}
<lst name="facet_pivot">
    <arr name="cat,popularity,inStock">
      <lst>
        <str name="field">cat</str>
        <str name="value">electronics</str>
        <int name="count">17</int>

        <arr name="pivot">
          <lst>
            <str name="field">popularity</str>
            <str name="value">6</str>
            <int name="count">5</int>
            <arr name="pivot">
              <lst>

                <str name="field">inStock</str>
                <str name="value">true</str>
                <int name="count">5</int>
              </lst>
            </arr>
          </lst>
          <lst>

            <str name="field">popularity</str>
            <str name="value">7</str>
            <int name="count">5</int>
            <arr name="pivot">
              <lst>
                <str name="field">inStock</str>
                <str name="value">true</str>

                <int name="count">3</int>
              </lst>
              <lst>
                <str name="field">inStock</str>
                <str name="value">false</str>
                <int name="count">2</int>
              </lst>

            </arr>
          </lst>
...
{code}


This patch still needs some work to make it work with distributed search

> Tree Faceting Component
> -----------------------
>
>                 Key: SOLR-792
>                 URL: https://issues.apache.org/jira/browse/SOLR-792
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Erik Hatcher
>            Assignee: Erik Hatcher
>            Priority: Minor
>         Attachments: SOLR-792-PivotFaceting.patch, SOLR-792-PivotFaceting.patch, SOLR-792.patch,
SOLR-792.patch, SOLR-792.patch, SOLR-792.patch, SOLR-792.patch, SOLR-792.patch
>
>
> A component to do multi-level faceting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message