lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Le Floc'h (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (SOLR-2242) Get distinct count of names for a facet field
Date Thu, 22 Dec 2011 11:02:30 GMT

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

Antoine Le Floc'h edited comment on SOLR-2242 at 12/22/11 11:02 AM:
--------------------------------------------------------------------

To help with the specification, my use case is this: I am using this patch and possibly want
to add extra infos in the facet results, and want to use sharding... Basically, this is what
I have today with the patch:
{code}
<lst name="shop_id">
  <int name="numTerms">10251</int>
  <lst name="counts">
    <int name="28013756">7032406</int>
    <int name="28009589">3616625</int>
    <int name="976">3497825</int>
    <int name="635">1398780</int>
    <int name="28021713">440118</int>
    <int name="29047336">368921</int>
    <int name="411">244689</int>
  </lst>
</lst>
{code}
and I want to subclass/modify SimpleFacets to add more data for each item (since I don't see
other way to do it)
                
      was (Author: alefloch):
    To help with the specification, my use case is this: I am using this patch and possibly
want to add extra infos in the facet results, and want to use sharding... Basically, this
is what I have today with the patch:

<lst name="shop_id">
  <int name="numTerms">10251</int>
  <lst name="counts">
    <int name="28013756">7032406</int>
    <int name="28009589">3616625</int>
    <int name="976">3497825</int>
    <int name="635">1398780</int>
    <int name="28021713">440118</int>
    <int name="29047336">368921</int>
    <int name="411">244689</int>
  </lst>
</lst>

and I want to subclass/modify SimpleFacets to add more data for each item (since I don't see
other way to do it)
                  
> Get distinct count of names for a facet field
> ---------------------------------------------
>
>                 Key: SOLR-2242
>                 URL: https://issues.apache.org/jira/browse/SOLR-2242
>             Project: Solr
>          Issue Type: New Feature
>          Components: Response Writers
>    Affects Versions: 4.0
>            Reporter: Bill Bell
>            Assignee: Erick Erickson
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: NumFacetTermsFacetsTest.java, SOLR-2242-notworkingtest.patch, SOLR-2242.patch,
SOLR-2242.patch, SOLR-2242.patch, SOLR-2242.shard.patch, SOLR-2242.shard.patch, SOLR-2242.shard.withtests.patch,
SOLR-2242.solr3.1-fix.patch, SOLR-2242.solr3.1.patch, SOLR.2242.solr3.1.patch, SOLR.2242.v2.patch
>
>
> When returning facet.field=<name of field> you will get a list of matches for distinct
values. This is normal behavior. This patch tells you how many distinct values you have (#
of rows). Use with limit=-1 and mincount=1.
> The feature is called "namedistinct". Here is an example:
> http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solr&indent=true&q=*:*&facet=true&facet.mincount=1&facet.numFacetTerms=2&facet.limit=-1&facet.field=price
> http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solr&indent=true&q=*:*&facet=true&facet.mincount=1&facet.numFacetTerms=0&facet.limit=-1&facet.field=price
> http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solr&indent=true&q=*:*&facet=true&facet.mincount=1&facet.numFacetTerms=1&facet.limit=-1&facet.field=price
> This currently only works on facet.field.
> {code}
> <lst name="facet_fields">
>   <lst name="price">
>     <int name="numFacetTerms">14</int>
>     <int name="0.0">3</int><int name="11.5">1</int><int name="19.95">1</int><int
name="74.99">1</int><int name="92.0">1</int><int name="179.99">1</int><int
name="185.0">1</int><int name="279.95">1</int><int name="329.95">1</int><int
name="350.0">1</int><int name="399.0">1</int><int name="479.95">1</int><int
name="649.99">1</int><int name="2199.0">1</int>
>   </lst>
> </lst>
> {code} 
> Several people use this to get the group.field count (the # of groups).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message