[jira] Commented: (SOLR-1240) Numerical Range faceting

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-1240) Numerical Range faceting

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SOLR-1240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890517#action_12890517 ]

Hoss Man commented on SOLR-1240:
--------------------------------

Using the example data, here's an example of a monster query that uses facet.date and facet.range on the same field with the same start/end/gap as well as doing facet.range on the (float) price and (ing) popularity fields ...

http://localhost:8983/solr/select/?wt=xml&indent=true&echoParams=none&q=*:*&rows=0&facet.range=price&f.price.facet.range.start=-2.3&f.price.facet.range.end=145.66&f.price.facet.range.gap=13.7432&facet.date=manufacturedate_dt&facet.date.start=NOW/YEAR-5YEARS&facet.date.end=NOW/YEAR%2B1DAY&facet.date.gap=%2B1YEAR&facet=true&facet.range.other=all&facet.range=manufacturedate_dt&f.manufacturedate_dt.facet.range.start=NOW/YEAR-5YEARS&f.manufacturedate_dt.facet.range.end=NOW/YEAR%2B1YEAR&f.manufacturedate_dt.facet.range.gap=%2B1YEAR&facet.range=popularity&facet.range.start=-2&facet.range.gap=3&facet.range.end=11

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">5</int>
</lst>
<result name="response" numFound="19" start="0"/>
<lst name="facet_counts">
  <lst name="facet_queries"/>
  <lst name="facet_fields"/>

  <lst name="facet_dates">
    <lst name="manufacturedate_dt">
      <int name="2005-01-01T00:00:00Z">2</int>
      <int name="2006-01-01T00:00:00Z">9</int>
      <int name="2007-01-01T00:00:00Z">0</int>
      <int name="2008-01-01T00:00:00Z">0</int>
      <int name="2009-01-01T00:00:00Z">0</int>

      <int name="2010-01-01T00:00:00Z">0</int>
      <str name="gap">+1YEAR</str>
      <date name="end">2011-01-01T00:00:00Z</date>
    </lst>
  </lst>
  <lst name="facet_ranges">
    <lst name="price">

      <lst name="meta">
        <float name="gap">13.7432</float>
        <float name="end">148.87521</float>
        <int name="before">0</int>
        <int name="after">10</int>
        <int name="between">7</int>

      </lst>
      <int name="-2.3">2</int>
      <int name="11.4432">2</int>
      <int name="25.186401">0</int>
      <int name="38.929604">0</int>
      <int name="52.672806">0</int>

      <int name="66.41601">2</int>
      <int name="80.15921">1</int>
      <int name="93.90241">0</int>
      <int name="107.645615">0</int>
      <int name="121.38882">0</int>
      <int name="135.13202">0</int>

    </lst>
    <lst name="manufacturedate_dt">
      <lst name="meta">
        <str name="gap">+1YEAR</str>
        <date name="end">2011-01-01T00:00:00Z</date>
        <int name="before">0</int>
        <int name="after">0</int>

        <int name="between">11</int>
      </lst>
      <int name="2005-01-01T00:00:00Z">2</int>
      <int name="2006-01-01T00:00:00Z">9</int>
      <int name="2007-01-01T00:00:00Z">0</int>
      <int name="2008-01-01T00:00:00Z">0</int>

      <int name="2009-01-01T00:00:00Z">0</int>
      <int name="2010-01-01T00:00:00Z">0</int>
    </lst>
    <lst name="popularity">
      <lst name="meta">
        <int name="gap">3</int>
        <int name="end">13</int>

        <int name="before">0</int>
        <int name="after">0</int>
        <int name="between">18</int>
      </lst>
      <int name="-2">3</int>
      <int name="1">2</int>

      <int name="4">13</int>
      <int name="7">7</int>
      <int name="10">2</int>
    </lst>
  </lst>
</lst>
</response>

{code}

> Numerical Range faceting
> ------------------------
>
>                 Key: SOLR-1240
>                 URL: https://issues.apache.org/jira/browse/SOLR-1240
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Gijs Kunze
>            Priority: Minor
>         Attachments: SOLR-1240.patch, SOLR-1240.patch, SOLR-1240.patch, SOLR-1240.patch, SOLR-1240.patch, SOLR-1240.patch, SOLR-1240.patch
>
>
> For faceting numerical ranges using many facet.query query arguments leads to unmanageably large queries as the fields you facet over increase. Adding the same faceting parameter for numbers which already exists for dates should fix this.

--
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: [hidden email]
For additional commands, e-mail: [hidden email]