You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2008/12/13 21:44:46 UTC

[jira] Created: (SOLR-911) multi-select facets

multi-select facets
-------------------

                 Key: SOLR-911
                 URL: https://issues.apache.org/jira/browse/SOLR-911
             Project: Solr
          Issue Type: New Feature
          Components: search
            Reporter: Yonik Seeley
             Fix For: 1.4


plumbing to support the selection of multiple constraints in a facet

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


[jira] Commented: (SOLR-911) multi-select facets

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657077#action_12657077 ] 

Hoss Man commented on SOLR-911:
-------------------------------

{quote}
This patch also adds the ability to specify a different output name/key... useful for complex facet queries:

facet.query=\{!key=foo\}rng:[1 TO 2] OR rng:[5 TO 9]
will cause the results to come back under a key of "foo" rather than "rng:[1 TO 2] OR rng:[5 TO 9]"
{quote}

but then how will the client know how what to filter on to actually constrain the query by "foo" since it won't actually ko what query that was?

> multi-select facets
> -------------------
>
>                 Key: SOLR-911
>                 URL: https://issues.apache.org/jira/browse/SOLR-911
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-911.patch, SOLR-911.patch, SOLR-911.patch
>
>
> plumbing to support the selection of multiple constraints in a facet

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


[jira] Updated: (SOLR-911) multi-select facets

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley updated SOLR-911:
------------------------------

    Attachment: SOLR-911.patch

OK, here's a prototype (still needs string-constants, distrib support, and tests) that implements support for multi-select facets by allowing the tagging of any query via the existing "localParams" syntax.  It adds localParams support to facet commands like facet.field to allow exclusion of certain filters.

fq={!tag=typefilter}type:pdf&facet.field={!ex=typefilter}myfield

both tag and ex may be a comma separated list to allow storing under different tags and selecting multiple tags.

The localParams method seems preferable since it can be arbitrarily extended for other controls, and already existed when parsing queries.  

This patch also adds the ability to specify a different output name/key... useful for complex facet queries:

facet.query={!key=foo}rng:[1 TO 2] OR rng:[5 TO 9]
will cause the results to come back under a key of "foo" rather than "rng:[1 TO 2] OR rng:[5 TO 9]"


> multi-select facets
> -------------------
>
>                 Key: SOLR-911
>                 URL: https://issues.apache.org/jira/browse/SOLR-911
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-911.patch
>
>
> plumbing to support the selection of multiple constraints in a facet

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


[jira] Issue Comment Edited: (SOLR-911) multi-select facets

Posted by "Erik Hatcher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656341#action_12656341 ] 

ehatcher edited comment on SOLR-911 at 12/13/08 1:50 PM:
-------------------------------------------------------------

bq. facet.query={!key=foo}rng:[1 TO 2] OR rng:[5 TO 9]

nice!

Another goodie to overload into the local params is something maybe like {!nocache} to prevent filling up the filter cache with something that is not meant to be reused or often.  There's another implementation over at SOLR-407.

      was (Author: ehatcher):
    bq. facet.query={!key=foo}rng:[1 TO 2] OR rng:[5 TO 9]

nice!

Another goodie to overload into the local params is something maybe something like {!nocache} to prevent filling up the filter cache with something that is not meant to be reused or often.
  
> multi-select facets
> -------------------
>
>                 Key: SOLR-911
>                 URL: https://issues.apache.org/jira/browse/SOLR-911
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-911.patch
>
>
> plumbing to support the selection of multiple constraints in a facet

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


[jira] Commented: (SOLR-911) multi-select facets

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657125#action_12657125 ] 

Hoss Man commented on SOLR-911:
-------------------------------

bq. Well, it's optional... it's only an issue for stateless clients without conventions or application specific knowledge - and they could always look at the original parameters via echoParams.

that assumes it wasn't baked into the config file.

I guess there's no harm in adding it (except perhaps confusion: i'd hate to see people assume that they can add "fq=key" since they got "key" back in the facet_queries section of the response)

my point was really just that facet constraint "labels" are really only useful if each label is easily associated with a way of applying that constraint.  replacing the query string with a "key" in the response is only useful if that key can be used for something.

It seems to me like it would be far more useful to just reserve "key" as a special local param that we guarantee will never get used, so people can include it in the facet.query and then parse it out of the response themselves.  

You can already do this today...

{noformat}
In Config...
    <lst name="defaults">
      <str name="facet.query">{!ignoredparam="Low Price"}price:[* TO 500]</str>
      <str name="facet.query">{!ignoredparam="Hight Price"}price:[500 TO *]</str>
      ...
In Query Response...
   <lst name="facet_queries">
     <int name="{!ignoredparam="Low Price"}price:[* TO 500]">3</int>
     <int name="{!ignoredparam="Hight Price"}price:[500 TO *]">0</int>
     ...
{noformat}

...but it would be nice to have a parma name reserved for this.

(admittedly it never occurred to me until this Jira post that that worked, i'm going to start encouraging every one i know to start doing that)


> multi-select facets
> -------------------
>
>                 Key: SOLR-911
>                 URL: https://issues.apache.org/jira/browse/SOLR-911
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-911.patch, SOLR-911.patch, SOLR-911.patch
>
>
> plumbing to support the selection of multiple constraints in a facet

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


[jira] Updated: (SOLR-911) multi-select facets

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley updated SOLR-911:
------------------------------

    Attachment: SOLR-911.patch

Attaching finished patch.
I'll wait a little while before committing to give time for others to review the API and suggest changes.


> multi-select facets
> -------------------
>
>                 Key: SOLR-911
>                 URL: https://issues.apache.org/jira/browse/SOLR-911
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-911.patch, SOLR-911.patch, SOLR-911.patch
>
>
> plumbing to support the selection of multiple constraints in a facet

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


[jira] Resolved: (SOLR-911) multi-select facets

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley resolved SOLR-911.
-------------------------------

    Resolution: Fixed

Committed.  I don't believe there are changes suggested to the API, just possible additions.
We can iterate or improve before 1.4.

> multi-select facets
> -------------------
>
>                 Key: SOLR-911
>                 URL: https://issues.apache.org/jira/browse/SOLR-911
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-911.patch, SOLR-911.patch, SOLR-911.patch
>
>
> plumbing to support the selection of multiple constraints in a facet

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


[jira] Commented: (SOLR-911) multi-select facets

Posted by "Erik Hatcher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656341#action_12656341 ] 

Erik Hatcher commented on SOLR-911:
-----------------------------------

.bq facet.query={!key=foo}rng:[1 TO 2] OR rng:[5 TO 9]

nice!

Another goodie to overload into the local params is something maybe something like {!nocache} to prevent filling up the filter cache with something that is not meant to be reused or often.

> multi-select facets
> -------------------
>
>                 Key: SOLR-911
>                 URL: https://issues.apache.org/jira/browse/SOLR-911
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-911.patch
>
>
> plumbing to support the selection of multiple constraints in a facet

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


[jira] Issue Comment Edited: (SOLR-911) multi-select facets

Posted by "Erik Hatcher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656341#action_12656341 ] 

ehatcher edited comment on SOLR-911 at 12/13/08 1:47 PM:
-------------------------------------------------------------

bq. facet.query={!key=foo}rng:[1 TO 2] OR rng:[5 TO 9]

nice!

Another goodie to overload into the local params is something maybe something like {!nocache} to prevent filling up the filter cache with something that is not meant to be reused or often.

      was (Author: ehatcher):
    .bq facet.query={!key=foo}rng:[1 TO 2] OR rng:[5 TO 9]

nice!

Another goodie to overload into the local params is something maybe something like {!nocache} to prevent filling up the filter cache with something that is not meant to be reused or often.
  
> multi-select facets
> -------------------
>
>                 Key: SOLR-911
>                 URL: https://issues.apache.org/jira/browse/SOLR-911
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-911.patch
>
>
> plumbing to support the selection of multiple constraints in a facet

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


[jira] Commented: (SOLR-911) multi-select facets

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657096#action_12657096 ] 

Yonik Seeley commented on SOLR-911:
-----------------------------------

bq. but then how will the client know how what to filter on to actually constrain the query by "foo" since it won't actually ko what query that was?

Well, it's optional... it's only an issue for stateless clients without conventions or application specific knowledge - and they could always look at the original parameters via echoParams.


> multi-select facets
> -------------------
>
>                 Key: SOLR-911
>                 URL: https://issues.apache.org/jira/browse/SOLR-911
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-911.patch, SOLR-911.patch, SOLR-911.patch
>
>
> plumbing to support the selection of multiple constraints in a facet

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


[jira] Updated: (SOLR-911) multi-select facets

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley updated SOLR-911:
------------------------------

    Attachment: SOLR-911.patch

Whew, things got complicated in distributed search.... refinement queries need to keep the same exclusions so that they get the right count.  I decided to implement a different approach that specifies a comma separated list of terms for the facet.field when refining.  This should result in much smaller refinement requests, less parsing overhead, and smaller response sizes.

Attaching latest draft... only thing left is to make some string constants I think.

> multi-select facets
> -------------------
>
>                 Key: SOLR-911
>                 URL: https://issues.apache.org/jira/browse/SOLR-911
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-911.patch, SOLR-911.patch
>
>
> plumbing to support the selection of multiple constraints in a facet

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