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

Gijs Kunze edited comment on SOLR-1240 at 7/23/10 5:10 AM:
-----------------------------------------------------------

I like the extra level, it'll make my response parser a little bit less messy. 
But if I may be so bold as to make another suggestion (which could also apply 
to other forms of faceting). On the client side of things it is starting to 
become more difficult to actually apply the correct filter queries to filter on 
the facets. How about an option to request a more verbose output, something 
like this:

{code:xml}
<lst name="popularity">
        <int name="start">-2</int>
        <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 name="counts">
            <lst name="-2">
                <int name="start">-2</int>
                <int name="end">1</int>
                <str name="filter">popularity:([-2 TO 1])</int>
                <int name="count">3</int>
            <lst>
            <lst name="1">
                <int name="start">1</int>
                <int name="end">4</int>
                <str name="filter">popularity:([1 TO 4])</int>
                <int name="count">2</int>
            <lst>
            <lst name="4">
                <int name="start">4</int>
                <int name="end">7</int>
                <str name="filter">popularity:([4 TO 7])</int>
                <int name="count">13</int>
            <lst>
            <lst name="7">
                <int name="start">7</int>
                <int name="end">10</int>
                <str name="filter">popularity:([7 TO 10])</int>
                <int name="count">7</int>
            <lst>
            <lst name="10">
                <int name="start">10</int>
                <int name="end">13</int>
                <str name="filter">popularity:([10 TO 13])</int>
                <int name="count">2</int>
            <lst>
        </lst>
</lst>
{code}

of course, if you use the include parameter to get more useful facets, the 
filter would be something like:

{code:xml}
                <str name="filter">popularity:([10 TO *] AND {* TO 13})</int>
{code}

This would make client side code a lot easier I think.

p.s. I noticed the start parameter was missing from your xml example, is that 
on purpose or a slight oversight?

      was (Author: gwkunze):
    I like the extra level, it'll make my response parser a little bit less 
messy. But if I may be so bold as to make another suggestion (which could also 
apply to other forms of faceting). On the client side of things it is starting 
to become more difficult to actually apply the correct filter queries to 
actually filter on the facets. How about an option to request a more verbose 
output, something like this:

{code:xml}
<lst name="popularity">
        <int name="start">-2</int>
        <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 name="counts">
            <lst name="-2">
                <int name="start">-2</int>
                <int name="end">1</int>
                <str name="filter">popularity:([-2 TO 1])</int>
                <int name="count">3</int>
            <lst>
            <lst name="1">
                <int name="start">1</int>
                <int name="end">4</int>
                <str name="filter">popularity:([1 TO 4])</int>
                <int name="count">2</int>
            <lst>
            <lst name="4">
                <int name="start">4</int>
                <int name="end">7</int>
                <str name="filter">popularity:([4 TO 7])</int>
                <int name="count">13</int>
            <lst>
            <lst name="7">
                <int name="start">7</int>
                <int name="end">10</int>
                <str name="filter">popularity:([7 TO 10])</int>
                <int name="count">7</int>
            <lst>
            <lst name="10">
                <int name="start">10</int>
                <int name="end">13</int>
                <str name="filter">popularity:([10 TO 13])</int>
                <int name="count">2</int>
            <lst>
        </lst>
</lst>
{code}

of course, if you use the include parameter to get more useful facets, the 
filter would be something like:

{code:xml}
                <str name="filter">popularity:([10 TO *] AND {* TO 13})</int>
{code}

This would make client side code a lot easier I think.

p.s. I noticed the start parameter was missing from your xml example, is that 
on purpose or a slight oversight?
  
> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to