lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amber Duque (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-2242) Get distinct count of names for a facet field
Date Fri, 30 Nov 2012 17:45:59 GMT

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

Amber Duque commented on SOLR-2242:
-----------------------------------

I have a question on the SOLR-2242-solr40-3.patch.
I have applied this patch on top of the Solr 4.0 release (http://svn.apache.org/repos/asf/lucene/dev/tags/
- lucene_solr_4_0_0).
The patch builds fine, but several solr unit tests fail:

Tests with failures:
  - org.apache.solr.request.TestFaceting.testFacets
  - org.apache.solr.request.TestFaceting.testRegularBig
  - org.apache.solr.cloud.BasicDistributedZkTest.testDistribSearch
  - org.apache.solr.TestDistributedSearch.testDistribSearch
  - org.apache.solr.TestDistributedGrouping.testDistribSearch
  - org.apache.solr.request.SimpleFacetsTest (suite)
  - org.apache.solr.TestGroupingSearch.testRandomGrouping
  - org.apache.solr.TestGroupingSearch.testGroupingGroupedBasedFaceting
  - org.apache.solr.cloud.BasicDistributedZk2Test.testDistribSearch

Do the unit tests pass successfully for anyone (for this patch applied on top of the solr
4.0 release)?

Thanks!
                
> 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-ALPHA
>            Reporter: Bill Bell
>            Priority: Minor
>             Fix For: 4.1
>
>         Attachments: SOLR-2242-3x_5_tests.patch, SOLR-2242-3x.patch, SOLR-2242.patch,
SOLR-2242.patch, SOLR-2242.patch, SOLR-2242.shard.withtests.patch, SOLR-2242.solr3.1-fix.patch,
SOLR-2242.solr3.1.patch, SOLR.2242.solr3.1.patch, SOLR-2242-solr40-3.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:
> Parameters:
> facet.numTerms or f.<field>.facet.numTerms = true (default is false) - turn on
distinct counting of terms
> facet.field - the field to count the terms
> It creates a new section in the facet section...
> http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solr&indent=true&q=*:*&facet=true&facet.mincount=1&facet.numTerms=true&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.numTerms=false&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.numTerms=true&facet.limit=-1&facet.field=price
> This currently only works on facet.field.
> {code}
> <lst name="facet_counts">
> <lst name="facet_queries"/>
> <lst name="facet_fields">...</lst>
> <lst name="facet_numTerms">
> <lst name="localhost:8983/solr/">
> <int name="price">14</int>
> </lst>
> <lst name="localhost:8080/solr/">
> <int name="price">14</int>
> </lst>
> </lst>
> <lst name="facet_dates"/>
> <lst name="facet_ranges"/>
> </lst>
> OR with no sharding-
> <lst name="facet_numTerms">
> <int name="price">14</int>
> </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
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