You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexandre Rafalovitch (JIRA)" <ji...@apache.org> on 2016/10/01 17:07:20 UTC

[jira] [Closed] (SOLR-3973) Cross facet, faceting on multiple columns.

     [ https://issues.apache.org/jira/browse/SOLR-3973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexandre Rafalovitch closed SOLR-3973.
---------------------------------------
    Resolution: Incomplete

Ancient discussion about facet implementation options. If still relevant, a new issue should be created. Probably against the new JSON facet API.

> Cross facet, faceting on multiple columns.
> ------------------------------------------
>
>                 Key: SOLR-3973
>                 URL: https://issues.apache.org/jira/browse/SOLR-3973
>             Project: Solr
>          Issue Type: Improvement
>          Components: SearchComponents - other
>    Affects Versions: 3.5
>            Reporter: ZhengBowen
>              Labels: cross, facet, solr
>             Fix For: 3.5
>
>         Attachments: crossfacet.patch
>
>
> We often come across the scene of the multi-faceted cross, For example, the SQL statement, select count( * ) from table group by A,B. 
> Now we slightly modified for FacetComponent, this component to be able to support the multi-faceted cross.you can facet on multiple columns, and get the count result of multi-faceted cross.
> Request parameters are as follows:
> &start=0&rows=0&q=*:*&facet=true&facet.field=user_city&facet.field=user_province&facet.limit=10&facet.cross=true&facet.cross.sep=,
> The original effect is as follows:
> <result name="response" numFound="479140" start="0" sum="0.0" max="-Infinity" min="Infinity"/>
> <lst name="facet_counts">
> <lst name="facet_queries"/>
> <lst name="facet_fields">
> <lst name="user_city">
> <int name="Beijing">16852</int>
> <int name="ShangHai">16787</int>
> <int name="Gunagzhou">12950</int>
> <int name="Shenzhen">11667</int>
> <int name="Hangzhou">9997</int>
> <int name="Chongqing">7624</int>
> <int name="Chengdu">7082</int>
> <int name="Wuhan">6894</int>
> <int name="Suzhou">6528</int>
> <int name="Tianjin">5822</int>
> </lst>
> <lst name="user_province">
> <int name="Gunagdong">48621</int>
> <int name="Zhengjiang">34634</int>
> <int name="Jiangsu">28748</int>
> <int name="Shandong">20389</int>
> <int name="Fujian">18508</int>
> <int name="Beijing">16852</int>
> <int name="Shanghai">16787</int>
> <int name="Hubei">15227</int>
> <int name="Sichuan">15112</int>
> <int name="Hebei">13793</int>
> </lst>
> </lst>
> <lst name="facet_numTerms"/>
> <lst name="facet_dates"/>
> <lst name="facet_ranges"/>
> </lst>
> The effect of the new features are as follows:
> <result name="response" numFound="479140" start="0" sum="0.0" max="-Infinity" min="Infinity"/>
> <lst name="facet_counts">
> <lst name="facet_queries"/>
> <lst name="facet_fields">
>   <lst name="user_city,user_province">
>   <int name="Beijing,Beijing">16852</int>
>   <int name="Shanghai,Shanghai">16787</int>
>   <int name="Guangzhou,Gunagdong">12950</int>
>   <int name="Shenzheng,Guangdong">11667</int>
>   <int name="Hangzhou,Zhejiang">9997</int>
>   <int name="Chongqing,Chongqing">7624</int>
>   <int name="Chengdu,Sichuan">7082</int>
>   <int name="Wuhan,Hubei">6894</int>
>   <int name="Suzhou,Jiangsu">6528</int>
> </lst>
> </lst>
> <lst name="facet_numTerms"/>
> <lst name="facet_dates"/>
> <lst name="facet_ranges"/>
> </lst>
> </response>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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