[ https://issues.apache.org/jira/browse/SOLR-5842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Raintung Li updated SOLR-5842: ------------------------------ Attachment: patch-5842.txt update code for functions > facet.pivot need provide the more information and additional function > --------------------------------------------------------------------- > > Key: SOLR-5842 > URL: https://issues.apache.org/jira/browse/SOLR-5842 > Project: Solr > Issue Type: Improvement > Components: SolrCloud > Affects Versions: 4.6 > Reporter: Raintung Li > Attachments: patch-5842.txt > > > Because facet can set the facet.limit and facet.offset, we can't get the next > array size for facet.pivot. If you want to get the next pivot size, you have > to set the facet.limit to max integer then to count the array size. In that > way you will get a lot of terms for pivot field that's impact the network and > Client. > Update some functions in the API > For example: > facet=true&facet.pivot=test,testb,id& > facet.pivot.min.field=id& -- Get the <id> min value > facet.pivot.max.field=id& -- Get the <id> max value > facet.pivot.sum.field=id -- Sum the <id> value > facet.pivot.count=true --- Open the get array size function > facet.pivot.count.field=id --Get the <id> array size > facet.pivot.count.next=true -- Get the next pivot field array size > Response: > <lst name="facet_pivot"> > <long name="idSUM">572</long> > <long name="idMAX">333</long> > <long name="idMIN">1</long> > <long name="idArrCount">12</long> > <arr name="test,testb,id"> > <lst> > <str name="field">test</str> > <str name="value">change.me</str> > <int name="count">5</int> > <long name="idSUM">91</long> > <long name="idMAX">33</long> > <long name="idMIN">1</long> > <long name="idArrCount">5</long> > <long name="testbArrCount">2</long> > <arr name="pivot"> > <lst> > <str name="field">testb</str> > <str name="value">test</str> > <int name="count">1</int> > <long name="idSUM">3</long> > <long name="idMAX">3</long> > <long name="idMIN">3</long> > <long name="idArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">id</str> > <int name="value">3</int> > <int name="count">1</int> > </lst> > </arr> > </lst> > <lst> > <str name="field">testb</str> > <null name="value"/> > <int name="count">4</int> > <long name="idSUM">88</long> > <long name="idMAX">33</long> > <long name="idMIN">1</long> > <long name="idArrCount">4</long> > <arr name="pivot"> > <lst> > <str name="field">id</str> > <int name="value">1</int> > <int name="count">1</int> > </lst> > <lst> > <str name="field">id</str> > <int name="value">22</int> > <int name="count">1</int> > </lst> > <lst> > <str name="field">id</str> > <int name="value">32</int> > <int name="count">1</int> > </lst> > <lst> > <str name="field">id</str> > <int name="value">33</int> > <int name="count">1</int> > </lst> > </arr> > </lst> > </arr> > </lst> > <lst> > <str name="field">test</str> > <str name="value">100</str> > <int name="count">1</int> > <long name="idSUM">66</long> > <long name="idMAX">66</long> > <long name="idMIN">66</long> > <long name="idArrCount">1</long> > <long name="testbArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">testb</str> > <null name="value"/> > <int name="count">1</int> > <long name="idSUM">66</long> > <long name="idMAX">66</long> > <long name="idMIN">66</long> > <long name="idArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">id</str> > <int name="value">66</int> > <int name="count">1</int> > </lst> > </arr> > </lst> > </arr> > </lst> > <lst> > <str name="field">test</str> > <str name="value">200</str> > <int name="count">1</int> > <long name="idSUM">34</long> > <long name="idMAX">34</long> > <long name="idMIN">34</long> > <long name="idArrCount">1</long> > <long name="testbArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">testb</str> > <null name="value"/> > <int name="count">1</int> > <long name="idSUM">34</long> > <long name="idMAX">34</long> > <long name="idMIN">34</long> > <long name="idArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">id</str> > <int name="value">34</int> > <int name="count">1</int> > </lst> > </arr> > </lst> > </arr> > </lst> > <lst> > <str name="field">test</str> > <str name="value">500</str> > <int name="count">1</int> > <long name="idSUM">23</long> > <long name="idMAX">23</long> > <long name="idMIN">23</long> > <long name="idArrCount">1</long> > <long name="testbArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">testb</str> > <null name="value"/> > <int name="count">1</int> > <long name="idSUM">23</long> > <long name="idMAX">23</long> > <long name="idMIN">23</long> > <long name="idArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">id</str> > <int name="value">23</int> > <int name="count">1</int> > </lst> > </arr> > </lst> > </arr> > </lst> > <lst> > <str name="field">test</str> > <str name="value">change.me1</str> > <int name="count">1</int> > <long name="idSUM">4</long> > <long name="idMAX">4</long> > <long name="idMIN">4</long> > <long name="idArrCount">1</long> > <long name="testbArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">testb</str> > <str name="value">test1</str> > <int name="count">1</int> > <long name="idSUM">4</long> > <long name="idMAX">4</long> > <long name="idMIN">4</long> > <long name="idArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">id</str> > <int name="value">4</int> > <int name="count">1</int> > </lst> > </arr> > </lst> > </arr> > </lst> > <lst> > <str name="field">test</str> > <str name="value">me</str> > <int name="count">1</int> > <long name="idSUM">11</long> > <long name="idMAX">11</long> > <long name="idMIN">11</long> > <long name="idArrCount">1</long> > <long name="testbArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">testb</str> > <str name="value">change.me</str> > <int name="count">1</int> > <long name="idSUM">11</long> > <long name="idMAX">11</long> > <long name="idMIN">11</long> > <long name="idArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">id</str> > <int name="value">11</int> > <int name="count">1</int> > </lst> > </arr> > </lst> > </arr> > </lst> > <lst> > <str name="field">test</str> > <str name="value">ok</str> > <int name="count">1</int> > <long name="idSUM">333</long> > <long name="idMAX">333</long> > <long name="idMIN">333</long> > <long name="idArrCount">1</long> > <long name="testbArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">testb</str> > <str name="value">ok</str> > <int name="count">1</int> > <long name="idSUM">333</long> > <long name="idMAX">333</long> > <long name="idMIN">333</long> > <long name="idArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">id</str> > <int name="value">333</int> > <int name="count">1</int> > </lst> > </arr> > </lst> > </arr> > </lst> > <lst> > <str name="field">test</str> > <null name="value"/> > <int name="count">1</int> > <long name="idSUM">10</long> > <long name="idMAX">10</long> > <long name="idMIN">10</long> > <long name="idArrCount">1</long> > <long name="testbArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">testb</str> > <str name="value">testb</str> > <int name="count">1</int> > <long name="idSUM">10</long> > <long name="idMAX">10</long> > <long name="idMIN">10</long> > <long name="idArrCount">1</long> > <arr name="pivot"> > <lst> > <str name="field">id</str> > <int name="value">10</int> > <int name="count">1</int> > </lst> > </arr> > </lst> > </arr> > </lst> > </arr> > </lst> -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org