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

ZhengBowen updated SOLR-3973:
-----------------------------

    Description: 
We often come across the scene of the multi-faceted cross, For example, the SQL 
statement, select count( * ) from table1 group by A,B. 

Now we slightly modified for FacetComponent, this component to be able to 
support the 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>

  was:
We often come across the scene of the multi-faceted cross, For example, the SQL 
statement, select count( * ) from table1 group by A,B. 

Now we slightly modified for FacetComponent, this component to be able to 
support the 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 effect of the new features are as follows:

<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">84</int>
<lst name="params">
<str name="facet.cross">true</str>
<str name="facet">true</str>
<str name="shards">
10.253.93.71:62511/solr,10.253.93.71:62512/solr,10.253.93.71:62513/solr,10.253.93.71:62514/solr,
</str>
<str name="facet.cross.sep">,</str>
<str name="start">0</str>
<str name="q">*:*</str>
<str name="facet.limit">10</str>
<arr name="facet.field">
<str>user_city</str>
<str>user_province</str>
</arr>
<str name="rows">0</str>
</lst>
</lst>
<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>

    
> Cross facet
> -----------
>
>                 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 table1 group by A,B. 
> Now we slightly modified for FacetComponent, this component to be able to 
> support the 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 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to