Solrã®Result Grouping
ä»åã¯Solrã®Result Groupingï¼Field Collapsingï¼ã®æ©è½ã«ã¤ãã¦ç´¹ä»ãã¾ãã
ãã®æ©è½ã¯æ¤ç´¢çµæãç¹å®ã®ãã£ã¼ã«ãã§ã°ã«ã¼ãåãã¾ããSQLã®group byã¿ãããªãã®ã¨æã£ã¦ãããã¨åãããããã§ããããå ·ä½çãªä¾ã ã¨Googleæ¤ç´¢ã®ä»¥ä¸ã®ãããªè¡¨ç¾ãè¯ãä¾ã§ããã
Solrã§ã¯ä¸è¨ã®Googleæ¤ç´¢ã¨åãäºããé常ã®æ¤ç´¢ã«group=true&group.field=ã°ã«ã¼ãåããé ç®åã¨ãããã©ã¡ã¼ã¿ãä»ããã ãã§è¡ãã¾ããResult Groupingã®è©³ç´°ãªæ å ±ã¯ãSolrã®wikiãFieldCollapsingãã«è©³ããæ¸ããã¦ãã¾ãã®ã§ãã¡ããè¦ã¦é ãäºã«ãã¦ãããã§ã¯ä¸è¦§ãç°¡åã«ç´¹ä»ããã ãã«ã¨ã©ãã主è¦ãªãã©ã¡ã¼ã¿ã«ã¤ãã¦è©¦ããªããç´¹ä»ãã¦ããããã¨æãã¾ãã
ãã©ã¡ã¼ã¿ä¸è¦§
ãã©ã¡ã¼ã¿å | æå®ããå¤ | 説æ |
---|---|---|
group | true/false | trueã§ãã®æ©è½ãæå¹ã«ãããçç¥æã¯false |
group.field | é ç®å | ã°ã«ã¼ãåããé
ç®ã 3.xã§ã¯æååç³»ï¼StrField, TextFieldãªã©ï¼ã®é ç®ä»¥å¤ã¯æå®ã§ããªããã¾ãmulti-valuedã®é ç®ãæå®ã§ããªã |
group.func | function query | ã°ã«ã¼ãåããçºã®function queryãæå®ã4.0ããã®æ©è½ |
group.query | query | é
ç®ã§ã¯ãªãæ¡ä»¶ã§ã°ã«ã¼ãåããããã®ã¯ã¨ãªã¼ãæå®ã ååã®ãã©ã¡ã¼ã¿ã§ç°ãªãã¯ã¨ãªã¼ãæå®å¯è½ã 使ç¨ä¾ï¼group.query=price:[0 TO 999]&group.query=price:[1000 TO *] æ¤ç´¢çµæã1000åæªæºã¨1000å以ä¸ã§ã°ã«ã¼ãå |
rows | æ°å¤ | ä¸åº¦ã®çµæã§è¿ãæ大æ°ãformatãgroupedã®å ´åã¯ããã¥ã¡ã³ãæ°ã§ã¯ãªãã°ã«ã¼ãæ°ã示ã |
start | æ°å¤ | çµæã®è¡¨ç¤ºéå§ä½ç½®ãrowsã¨åæ§ã«ã°ã«ã¼ãæ°ãªã®ã§æ³¨æ |
group.limit | æ°å¤ | ã°ã«ã¼ãåããããã¥ã¡ã³ãã®è¡¨ç¤ºæ大æ°ãçç¥æã¯1 |
group.offset | æ°å¤ | ã°ã«ã¼ãåããããã¥ã¡ã³ãã®è¡¨ç¤ºéå§ä½ç½®ãçç¥æã¯0 |
sort | ã½ã¼ãæ¡ä»¶ | æ¤ç´¢çµæã®ã½ã¼ãé ãçç¥æã¯Luceneãç®åºããã¹ã³ã¢é |
group.sort | ã½ã¼ãæ¡ä»¶ | ã°ã«ã¼ãåããããã¥ã¡ã³ãã®è¡¨ç¤ºé ãçç¥æã¯Luceneãç®åºããã¹ã³ã¢é |
group.format | grouped/simple | æ¤ç´¢çµæã®è¡¨ç¤ºå½¢å¼ãçç¥æã¯grouped |
group.main | true/false | trueã§æ¤ç´¢çµæã®è¡¨ç¤ºå½¢å¼ããé常ã®æ¤ç´¢çµæã¨åãå½¢å¼ã«ããã使ããªããªããã©ã¡ã¼ã¿æãï¼è©³ç´°ã¯å¾è¿°ï¼ çç¥æã¯false |
group.ngroups | true/false | trueã§ã°ã«ã¼ãåä½ã®æ¤ç´¢çµæç·æ°ãçµæã«å ãããçç¥æã¯false |
group.truncate | true/false | trueã§ãã¡ã»ããã«ã¦ã³ããããã¥ã¡ã³ãæ°ã§ã¯ãªãã°ã«ã¼ãåä½ã®æ°ã«ãããçç¥æã¯false |
group.cache.percent | 0ã100 | 1以ä¸ã®å¤ãæå®ããäºã§ã°ã«ã¼ãåã®ããã®æ¤ç´¢ããã£ãã·ã¥ããã ï¼1以ä¸ã®å¤ãè¨å®ãã¦ãquery result cacheã«ããã£ãã·ã¥ãããã詳細ã¯ä¸æã»ã»ã»ãããã©ã¼ãã³ã¹è¨æ¸¬ã®çµæãå¹æã¯ãã£ãããwikiã«ã¯ç°¡åãªqueryã«é©ç¨ããã¨ããã©ã¼ãã³ã¹ã«æªå½±é¿ãåºããããã¨æ¸ãã¦ãã»ã»ã»ãï¼ çç¥æã¯false |
ãããã®ãã©ã¡ã¼ã¿ã¯ã大ããåããã¨ä»¥ä¸ã®ãããªã°ã«ã¼ãã«åãããã¾ãã
- åºæ¬çãªãã©ã¡ã¼ã¿
- çµæã®ãã©ã¼ããã
- ãã¡ã»ããã®çºã®æ©è½
ãããããããã試ãã¦ã¿ã¾ããä»åãµã³ãã«ãã¼ã¿ã¨ãã¦ã日本語のwikipediaの記事ï¼jawiki-latest-pages-articles.xml.bz2ï¼ã使ããã¦ãããã¾ããã
åºæ¬çãªãã©ã¡ã¼ã¿
ã¾ããResult Groupingãè¦ãåã«ãæ¯è¼ã®çºã«é常ã®æ¤ç´¢çµæãè¦ã¦ã¿ã¾ããï¼ä»¥éãã¹ã¦ããã©ããã®æ¤ç´¢çµæã§ããï¼
/solr/select/?q=content%3A%E3%81%86%E3%81%A9%E3%82%93&version=2.2&start=0&rows=10&indent=on
<response> <lst name="responseHeader"> ... (çµéæéãæå®ãããã©ã¡ã¼ã¿ãªã©ã®ãããæ å ±) ... </lst> <result name="response" numFound="2491" start="0"> ã»ã»ã»â <doc> <str name="contributor-id">24321</str> <str name="contributor-name">åèçæ°</str> <str name="id">767255</str> <date name="timestamp">2006-11-16T23:25:10Z</date> <str name="title">ç°èãã©ã</str> <str name="url"> http://ja.wikipedia.org/wiki/%E7%94%B0%E8%88%8E%E3%81%86%E3%81%A9%E3%82%93 </str> </doc> <doc> <str name="contributor-id">40160</str> <str name="contributor-name">ä¸ææ´¾</str> <str name="id">540810</str> <date name="timestamp">2006-05-17T13:09:14Z</date> <str name="title">天ã·ããã©ã</str> <str name="url"> http://ja.wikipedia.org/wiki/%E5%A4%A9%E3%81%B7%E3%82%89%E3%81%86%E3%81%A9%E3%82%93 </str> </doc> ... (以ä¸hitããããã¥ã¡ã³ãã®æ å ±ãç¶ã) ... </result> </response>
ä¸è¨ãé常ã®æ¤ç´¢çµæã§ãâ ã®resultè¦ç´ ã®åè¦ç´ ã®docãhitããããã¥ã¡ã³ãã§ããã¾ãâ ã®resultè¦ç´ ã®numFoundå±æ§ããhitããããã¥ã¡ã³ãã®ç·æ°ã§ããã§ã¯ãæ¡ä»¶ã¯åãã¾ã¾ãcontributor-idï¼wikipediaã®contributorã«å²ãå½ã¦ããã¦ããå
é¨IDï¼ã§ã°ã«ã¼ãåãã¦ã¿ã¾ãã
/solr/select/?q=content%3A%E3%81%86%E3%81%A9%E3%82%93&version=2.2&start=0&rows=10&indent=on&group=true&group.field=contributor-id
<response> <lst name="responseHeader">...</lst> <lst name="grouped"> ã»ã»ã»â <lst name="contributor-id"> <int name="matches">2491</int> ã»ã»ã»â¡ <arr name="groups"> ã»ã»ã»â¢ <lst> <str name="groupValue">24321</str> ã»ã»ã»â£ <result name="doclist" numFound="3" start="0"> ã»ã»ã»â¤ <doc> <str name="contributor-id">24321</str> <str name="contributor-name">åèçæ°</str> <str name="id">767255</str> <date name="timestamp">2006-11-16T23:25:10Z</date> <str name="title">ç°èãã©ã</str> <str name="url"> http://ja.wikipedia.org/wiki/%E7%94%B0%E8%88%8E%E3%81%86%E3%81%A9%E3%82%93 </str> </doc> </result> </lst> ... (以ä¸hitããã°ã«ã¼ãã®æ å ±ãç¶ã) ... </arr> </lst> </lst> </response>
Result Groupingã®ãã©ã¡ã¼ã¿ã追å ããäºã§ãçµæãcontributorãã¨ã«ã°ã«ã¼ãåãããããããã®contributorãã¨ã«1ã¤ã®çµæã®ã¿ãè¿ãããããã«ãªãã¾ãããã¾ããé常ã®æ¤ç´¢ã¨æ¯ã¹ã¦ããªãæ§é ãå¤ããã¾ããã
- â ã¯é常æ¤ç´¢ã®resultè¦ç´ ã¨åãã§ãçµæé¨åã®rootè¦ç´ ã§ãã
- â¡ã¯é常æ¤ç´¢ã®numFoundå±æ§ã¨åãã§ããã®æ¤ç´¢ã§hitããããã¥ã¡ã³ãã®ç·æ°ã§ãï¼ã°ã«ã¼ãæ°ã§ã¯ããã¾ããï¼
- â¢ã®åè¦ç´ ã®lstè¦ç´ ããããããã®ã°ã«ã¼ããã¨ã«ã¾ã¨ããããçµæã®è¦ç´ ã§ãã
- â£ã¯ã°ã«ã¼ãåããé ç®ã®å¤ã§ãï¼contributorã®IDï¼
- â¤ã®è¦ç´ ã¯ã°ã«ã¼ãåããããã¥ã¡ã³ããä¿æãã¾ããæ大ã§group.limitã§æå®ããæ°ãä¿æãã¾ããnumFoundã¯ãã°ã«ã¼ãå ã®hitããããã¥ã¡ã³ãã®ç·æ°ã§ãã
次ã¯group.limitãæå®ãã¦ã¿ã¾ãã
/solr/select/?q=content%3A%E3%81%86%E3%81%A9%E3%82%93&version=2.2&start=0&rows=10&indent=on&group=true&group.field=contributor-id&group.limit=2
<response> <lst name="responseHeader">...</lst> <lst name="grouped"> <lst name="contributor-id"> <int name="matches">2491</int> <arr name="groups"> ... (ä¸ç¥) ... <lst> <str name="groupValue">103575</str> <result name="doclist" numFound="4" start="0"> ã»ã»ã»â <doc> <str name="contributor-id">103575</str> <str name="contributor-name">Pcs34560</str> <str name="id">24461</str> <date name="timestamp">2003-11-07T16:50:09Z</date> <str name="title">é¥é£©</str> <str name="url">http://ja.wikipedia.org/wiki/%E9%A5%82%E9%A3%A9</str> </doc> <doc> <str name="contributor-id">103575</str> <str name="contributor-name">Pcs34560</str> <str name="id">24460</str> <date name="timestamp">2011-09-21T13:21:13Z</date> <str name="title">ãã©ã</str> <str name="url"> http://ja.wikipedia.org/wiki/%E3%81%86%E3%81%A9%E3%82%93 </str> </doc> </result> </lst> ... (以ä¸hitããã°ã«ã¼ãã®æ å ±ãç¶ã) ... </arr> </lst> </lst> </response>
äºã¤è¡¨ç¤ºãããããã«ãªãã¾ãããä¸ã®â ã®numFoundã§ã°ã«ã¼ãå
ã«ã¯å
¨é¨ã§4件hitããããã¥ã¡ã³ããããäºãåããã¾ãããã®æ
å ±ãå©ç¨ããã°Googleæ¤ç´¢ã¨åãããã«ãââããã£ã¨è¦ãããå®ç¾ã§ãã¾ããã
次ã¯ã°ã«ã¼ãåããæã®ãã¼ã¸ã³ã°å¦çã«å¿
è¦ã¨ãªããgroup.ngroupsãæå®ãã¦ã¿ã¾ãã
/solr/select/?q=content%3A%E3%81%86%E3%81%A9%E3%82%93&version=2.2&start=0&rows=10&indent=on&group=true&group.field=contributor-id&group.ngroups=true
<response> <lst name="responseHeader">...</lst> <lst name="grouped"> <lst name="contributor-id"> <int name="matches">2491</int> ã»ã»ã»â <int name="ngroups">1244</int> ã»ã»ã»â¡ <arr name="groups"> <lst>...</lst> <lst>...</lst> <lst>...</lst> ... (ç¥) ... </arr> </lst> </lst> </response>
ä¸è¨â ã¯ãé常ã®æ¤ç´¢hitç·ä»¶æ°ï¼ããã¥ã¡ã³ãæ°ï¼ã§ãâ¡ãç·ã°ã«ã¼ãæ°ã¨ãªãã¾ãã1ãã¼ã¸ã®è¡¨ç¤ºæ大æ°ã¯ã°ã«ã¼ãæ°ã§æ°ããããçºãResult Groupingã®æ¤ç´¢ã®ãã¼ã¸ã³ã°ã«ã¯â¡ã®æ°å¤ãç¨ãã¾ãã
çµæã®ãã©ã¼ããã
ããã¾ã§è¦ã¦ããResult Groupingã®æ¤ç´¢çµæã®æ§é ã¯ãããã§ã¯ãªãæ¤ç´¢çµæã®æ§é ã¨æ¯è¼ããã¨ãçµæ§éããããã¾ããããã¨è¦æ§é ãè¤éã§ãããçµæã®è§£æããã®å大å¤ã«ãªãã¾ãããããã軽æ¸ããçºã«ãããã¾ã§è¦ã¦ãããã®ãåããã¦3種é¡ã®å½¢å¼ãç¨æããã¦ãã¾ãããã¨ã®2種é¡ã¯ããããããã¾ã§ããã·ã³ãã«ãªæ§é ã«ãªãã¾ãããåºæ¥ãäºãå¤ããã¾ããããã©ã¼ãã³ã¹ã¯ã©ãããã¾ãå¤ãããªãã£ãã®ã§ãç¨éã«åã£ããã©ã¼ããããé¸ã¶ã¨è¯ãã§ããããé¸æã§ãããã©ã¼ãããã¯ä»¥ä¸ã®3ã¤ã§ãã
No | å称 | 説æ |
---|---|---|
1 | grouped | ããã¾ã§è¦ã¦ããæ§é ï¼ããã©ã«ãã®å½¢å¼ï¼ |
2 | simple | groupedããã·ã³ãã«ãªæ§é |
3 | main | é常ã®æ¤ç´¢çµæã¨ã»ã¼åãæ§é |
groupedã¯ããã¾ã§è¦ã¦ããå½¢å¼ã§ããããããããã¾ãããããããªæ§é ã§ããã
<response> <lst name="responseHeader">...</lst> <lst name="grouped"> <lst name="contributor-id"> <int name="matches">2491</int> <int name="ngroups">1244</int> <arr name="groups"> <lst> <str name="groupValue">24321</str> <result name="doclist" numFound="3" start="0"> <doc> <str name="contributor-id">24321</str> ... (ç¥) ... </doc> <doc>... (ç¥) ...</doc> <doc>... (ç¥) ...</doc> ... (以ä¸group.limitãä¸éã¨ãã¦docè¦ç´ ãç¹°ãè¿ã) ... </result> </lst> <lst>...</lst> <lst>...</lst> ... (以ä¸ã°ã«ã¼ãåä½ã§limitãä¸éã¨ãã¦lstè¦ç´ ãç¹°ãè¿ã) ... </arr> </lst> </lst> </response>
2çªç®ã®simpleã¯ãéä¸ã¾ã§ã®æ§é ã¯groupedã¨åãã§ãããããã¥ã¡ã³ããã°ã«ã¼ããã¨ã«ã¾ã¨ãããããå
¨ã¦å¹³ããªæ§é ã«ãªã£ã¦ããã®ãç¹å¾´ã§ããã¾ããgroupedã¨ã¯äºãªãããã¼ã¸ãããã®è¡¨ç¤ºæ°ã¯ã°ã«ã¼ãæ°ã§ã¯ãªãããã¥ã¡ã³ãæ°ã¨ãªãã¾ãããã®çºãngroupsã®æå®ã¨åå¾ãåºæ¥ãã®ã§ããããã¾ã使ãéã¯ãªãã§ãããã
/solr/select/?q=content%3A%E3%81%86%E3%81%A9%E3%82%93&version=2.2&start=0&rows=10&indent=on&group=true&group.field=contributor-id&group.ngroups=true&group.format=simple
<response> <lst name="responseHeader">...</lst> <lst name="grouped"> <lst name="contributor-id"> <int name="matches">2491</int> <int name="ngroups">1244</int> <result name="doclist" numFound="2491" start="0"> <doc>... (ç¥) ...</doc> <doc>... (ç¥) ...</doc> <doc> <str name="contributor-id">30901</str> <str name="contributor-name">âDâ</str> <str name="id">457105</str> <date name="timestamp">2006-02-23T11:08:35Z</date> <str name="title">å·åãã©ã</str> <str name="url"> http://ja.wikipedia.org/wiki/%E5%86%B7%E5%87%8D%E3%81%86%E3%81%A9%E3%82%93 </str> </doc> âã°ã«ã¼ãåããããã©ããã«æ±ããã <doc> <str name="contributor-id">14864</str> <str name="contributor-name">é亡è </str> <str name="id">473792</str> <date name="timestamp">2006-03-09T19:52:36Z</date> <str name="title">èãã©ã</str> <str name="url"> http://ja.wikipedia.org/wiki/%E8%82%89%E3%81%86%E3%81%A9%E3%82%93 </str> </doc> <doc> <str name="contributor-id">14864</str> <str name="contributor-name">é亡è </str> <str name="id">1332131</str> <date name="timestamp">2010-12-29T12:09:31Z</date> <str name="title">ã¿ãã (ææ§ãåé¿)</str> <str name="url"> http://ja.wikipedia.org/wiki/%E3%82%BF%E3%83%8C%E3%82%AD_%28%E6%9B%96%E6%98%A7%E3%81%95%E5%9B%9E%E9%81%BF%29 </str> </doc> <doc>... (ç¥) ...</doc> <doc>... (ç¥) ...</doc> <doc>... (ç¥) ...</doc> <doc>... (ç¥) ...</doc> <doc>... (ç¥) ...</doc> </result> </lst> </lst> </response>
simpledã®ç¨éã¯ãæ¤ç´¢çµæã¯ãã©ããã«è¡¨ç¤ºããããæ¤ç´¢çµæãã°ã«ã¼ããã¨ã«ã¾ã¨ãã¦è¡¨ç¤ºããããã¨ãã£ãæã«ä½¿ããã§ãããããã ãããã®ããã«è¡¨ç¤ºãããå ´åãªãã大æµã®å ´åã¯æ¬¡ã®mainã使ãã®ãè¯ãã§ããããmainã¯ã»ã¼é常ã®æ¤ç´¢çµæã¨åãæ§é ã§ã¬ã¹ãã³ã¹ãè¿ãã¾ãã
/solr/select/?q=content%3A%E3%81%86%E3%81%A9%E3%82%93&version=2.2&start=0&rows=10&indent=on&group=true&group.field=contributor-id&group.ngroups=true&group.main=true
<response> <lst name="responseHeader">...</lst> <lst name="grouped"/> ã»ã»ã»â <result name="response" numFound="2491" start="0"> <doc> <str name="contributor-id">24321</str> <str name="contributor-name">åèçæ°</str> <str name="id">767255</str> <date name="timestamp">2006-11-16T23:25:10Z</date> <str name="title">ç°èãã©ã</str> <str name="url"> http://ja.wikipedia.org/wiki/%E7%94%B0%E8%88%8E%E3%81%86%E3%81%A9%E3%82%93 </str> </doc> <doc> <str name="contributor-id">40160</str> <str name="contributor-name">ä¸ææ´¾</str> <str name="id">540810</str> <date name="timestamp">2006-05-17T13:09:14Z</date> <str name="title">天ã·ããã©ã</str> <str name="url"> http://ja.wikipedia.org/wiki/%E5%A4%A9%E3%81%B7%E3%82%89%E3%81%86%E3%81%A9%E3%82%93 </str> </doc> <doc> <str name="contributor-id">30901</str> <str name="contributor-name">âDâ</str> <str name="id">457105</str> <date name="timestamp">2006-02-23T11:08:35Z</date> <str name="title">å·åãã©ã</str> <str name="url"> http://ja.wikipedia.org/wiki/%E5%86%B7%E5%87%8D%E3%81%86%E3%81%A9%E3%82%93 </str> </doc> <doc>...</doc> <doc>...</doc> <doc>...</doc> <doc>...</doc> <doc>...</doc> <doc>...</doc> <doc>...</doc> </result> </response>
é常ã®æ¤ç´¢çµæã¨ã®éãã¯ãä¸è¨ã®â ã®é¨åã ãã§ãããã®å¯ä¸ã®éãã®è¦ç´ ã¯ç©ºè¦ç´ ã§ä½ã®å±æ§ãæããªããããä½ã«ä½¿ãã®ãåããã¾ããããResult Groupingã示ãç®å°ã§ãããããããã®å½¢å¼ã®æ³¨æç¹ã¯ãngroupsãåå¾ã§ããªããªãäºã§ããã°ã«ã¼ãåä½ã®ç·ä»¶æ°ãåå¾ãããå ´åã¯ãsimpleãããã¯groupedã使ã£ã¦ä¸ãããï¼3.4æç¹ã§ã¯ã¾ã åå¾ã§ãã¾ãããã@johtaniããã«æãã¦ããã£ãこのページã«ããã¨å°æ¥çã«åå¾ã§ããããã«ãªãããããã¾ããï¼ã¾ããgroupedãããã¯simpleã®ãã©ã¼ãããæå®ã¯ç¡è¦ããã¾ãã
ãã¡ã»ããã®çºã®æ©è½
ãã¡ã»ããæ¤ç´¢ã§ã®ãã¡ã»ãããã¨ã®ã«ã¦ã³ãã«ä½¿ãæ©è½ãæä¾ããã¦ãã¾ããé常ã¯ãããããããã¥ã¡ã³ãåä½ã®æ°ããã¡ã»ããã«ã¦ã³ãã«ç´ä»ãããã¾ããããã®å¤ãã°ã«ã¼ãåä½ã«ããäºãåºæ¥ã¾ããã¾ãã¯Result Groupingã¨ãã¡ã»ããããã®ã¾ã¾ä½¿ã£ã¦ã¿ã¾ãããã
/solr/select/?q=content%3A%E3%81%86%E3%81%A9%E3%82%93&version=2.2&start=0&rows=10&indent=on&group=true&group.field=contributor-id&facet=true&facet.date=timestamp&facet.date.start=NOW%2FMONTH-2YEARS&facet.date.end=NOW%2FMONTH-1MONTH&facet.date.gap=%2B1MONTH
<response> <lst name="responseHeader">...</lst> <lst name="grouped">... (æ¤ç´¢çµæçç¥) ...</lst> <lst name="facet_counts"> <lst name="facet_queries"/> <lst name="facet_fields"/> <lst name="facet_dates"> <lst name="timestamp"> <int name="2009-10-01T00:00:00Z">11</int> <int name="2009-11-01T00:00:00Z">9</int> <int name="2009-12-01T00:00:00Z">11</int> <int name="2010-01-01T00:00:00Z">13</int> <int name="2010-02-01T00:00:00Z">9</int> <int name="2010-03-01T00:00:00Z">19</int> <int name="2010-04-01T00:00:00Z">7</int> <int name="2010-05-01T00:00:00Z">15</int> <int name="2010-06-01T00:00:00Z">18</int> <int name="2010-07-01T00:00:00Z">31</int> <int name="2010-08-01T00:00:00Z">21</int> <int name="2010-09-01T00:00:00Z">25</int> <int name="2010-10-01T00:00:00Z">29</int> <int name="2010-11-01T00:00:00Z">30</int> <int name="2010-12-01T00:00:00Z">36</int> <int name="2011-01-01T00:00:00Z">64</int> <int name="2011-02-01T00:00:00Z">69</int> <int name="2011-03-01T00:00:00Z">54</int> <int name="2011-04-01T00:00:00Z">80</int> <int name="2011-05-01T00:00:00Z">111</int> <int name="2011-06-01T00:00:00Z">145</int> <int name="2011-07-01T00:00:00Z">236</int> <int name="2011-08-01T00:00:00Z">425</int> <str name="gap">+1MONTH</str> <date name="start">2009-10-01T00:00:00Z</date> <date name="end">2011-09-01T00:00:00Z</date> </lst> </lst> <lst name="facet_ranges"/> </lst> </response>
ãã©ãã¨æ¸ãããè¨äºã®ãæçµæ´æ°æ¥ã®æãã¨ã®ããã¥ã¡ã³ãæ°ãåå¾ã§ãã¾ããããã ããã°ã«ã¼ããã¨ã«ã¾ã¨ãã¦è¡¨ç¤ºããå ´åã¯ã表示ãã件æ°ã¯ããã¥ã¡ã³ãæ°ããå°ãªããªã£ã¦ãã¾ãã¾ããããã§ããã¡ã»ããã«ã¦ã³ããã°ã«ã¼ãæ°ã«ãã¦ã¿ã¾ãããã
/solr/select/?q=content%3A%E3%81%86%E3%81%A9%E3%82%93&version=2.2&start=0&rows=10&indent=on&group=true&group.field=contributor-id&group.truncate=true&facet=true&facet.date=timestamp&facet.date.start=NOW%2FMONTH-2YEARS&facet.date.end=NOW%2FMONTH-1MONTH&facet.date.gap=%2B1MONTH
<response> <lst name="responseHeader">...</lst> <lst name="grouped">... (æ¤ç´¢çµæçç¥) ...</lst> <lst name="facet_counts"> <lst name="facet_queries"/> <lst name="facet_fields"/> <lst name="facet_dates"> <lst name="timestamp"> <int name="2009-10-01T00:00:00Z">4</int> <int name="2009-11-01T00:00:00Z">7</int> <int name="2009-12-01T00:00:00Z">5</int> <int name="2010-01-01T00:00:00Z">8</int> <int name="2010-02-01T00:00:00Z">8</int> <int name="2010-03-01T00:00:00Z">7</int> <int name="2010-04-01T00:00:00Z">4</int> <int name="2010-05-01T00:00:00Z">9</int> <int name="2010-06-01T00:00:00Z">11</int> <int name="2010-07-01T00:00:00Z">14</int> <int name="2010-08-01T00:00:00Z">11</int> <int name="2010-09-01T00:00:00Z">19</int> <int name="2010-10-01T00:00:00Z">15</int> <int name="2010-11-01T00:00:00Z">17</int> <int name="2010-12-01T00:00:00Z">21</int> <int name="2011-01-01T00:00:00Z">40</int> <int name="2011-02-01T00:00:00Z">38</int> <int name="2011-03-01T00:00:00Z">31</int> <int name="2011-04-01T00:00:00Z">43</int> <int name="2011-05-01T00:00:00Z">54</int> <int name="2011-06-01T00:00:00Z">76</int> <int name="2011-07-01T00:00:00Z">113</int> <int name="2011-08-01T00:00:00Z">200</int> <str name="gap">+1MONTH</str> <date name="start">2009-10-01T00:00:00Z</date> <date name="end">2011-09-01T00:00:00Z</date> </lst> </lst> <lst name="facet_ranges"/> </lst> </response>
group.truncate=trueãæå®ããäºã§ãã¡ã»ããã«ã¦ã³ããæ¸ããã°ã«ã¼ãåä½ã«ãªãã¾ãããããã§ã¯ç´¹ä»ãã¾ããããStatsComponentã®çµæã«ãæå¹ã§ãã
ãããªæãã§Result Groupingã¯ç°¡åã«ä½¿ãã¾ãã3.5ã¨4.0ããé¨åçã«åæ£æ¤ç´¢ã«å¯¾å¿ãã¾ãããããã©ã¼ãã³ã¹ã®æ¹åäºå®ããããããªã®ã§ãä»å¾ä½¿ãæ©ä¼ãå¢ãããã§ããã