{"id":5989,"date":"2011-10-03T07:30:50","date_gmt":"2011-10-03T05:30:50","guid":{"rendered":"http:\/\/blog.orange11.nl\/?p=5989"},"modified":"2011-10-03T07:30:50","modified_gmt":"2011-10-03T05:30:50","slug":"apache-solr-grouping-update","status":"publish","type":"post","link":"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/","title":{"rendered":"Apache Solr &#8211; Grouping update"},"content":{"rendered":"<p>Apache Solr&#8217;s result grouping feature is now a widely used feature. The major drawback was that grouping (also known as sharding in Solr) was initially not supported for distributed searches. The good news is that recently distributed grouping has been added to Solr! It has been added as the trunk and the stable branch (branch3x). This means that distributed grouping will be included in the upcoming Solr 3.5 and Solr 4.0 release.<\/p>\n<div id=\"cke_pastebin\">In order to use distributed grouping you just need to be familiar with Solr&#8217;s <a href=\"http:\/\/wiki.apache.org\/solr\/DistributedSearch\" target=\"_blank\" rel=\"noopener\">distributed search<\/a>\u00a0and <a href=\"http:\/\/wiki.apache.org\/solr\/FieldCollapsing\" target=\"_blank\" rel=\"noopener\">result grouping<\/a>.\u00a0There is no need for specific configuration or request parameter options. There are<a href=\"http:\/\/wiki.apache.org\/solr\/FieldCollapsing#Request_Parameters\" target=\"_blank\" rel=\"noopener\"> two request parameter options<\/a>\u00a0that behave differently in distributed mode. The first option\u00a0<strong>group.ngroups<\/strong> options is a features that returns the number of groups. The second option <strong>group.truncate<\/strong> let features like faceting base their results on the grouped result instead of ungrouped results. These features do not give the same results compared to if these features were used in a non sharded environment. For example the total number of groups counted are most likely be higher compared to if you run it in a new sharded environment. How large the difference depends on how the documents are divided between the shards. If you partition the documents in such a way that documents belonging to a group are in one shard, then the group count will be accurate and correct. If you can&#8217;t partition the documents then you can still use this feature to compute an upper bound group count.<\/div>\n<div id=\"cke_pastebin\"><\/div>\n<div id=\"cke_pastebin\">Currently only grouping by field and query works for distributed grouping. The support for\u00a0<a title=\"SOLR-2777\" href=\"http:\/\/issues.apache.org\/jira\/browse\/SOLR-2777\" target=\"_blank\" rel=\"noopener\">distributed grouping by function<\/a>\u00a0will be added soon. So stay tuned!<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Apache Solr&#8217;s result grouping feature is now a widely used feature. The major drawback was that grouping (also known as sharding in Solr) was initially not supported for distributed searches. The good news is that recently distributed grouping has been added to Solr! It has been added as the trunk and the stable branch (branch3x). [&hellip;]<\/p>\n","protected":false},"author":77,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[15,65],"tags":[33,269],"class_list":["post-5989","post","type-post","status-publish","format-standard","hentry","category-enterprise-search","category-big_data_search","tag-solr","tag-result-grouping"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Apache Solr - Grouping update - Trifork Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Solr - Grouping update - Trifork Blog\" \/>\n<meta property=\"og:description\" content=\"Apache Solr&#8217;s result grouping feature is now a widely used feature. The major drawback was that grouping (also known as sharding in Solr) was initially not supported for distributed searches. The good news is that recently distributed grouping has been added to Solr! It has been added as the trunk and the stable branch (branch3x). [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/\" \/>\n<meta property=\"og:site_name\" content=\"Trifork Blog\" \/>\n<meta property=\"article:published_time\" content=\"2011-10-03T05:30:50+00:00\" \/>\n<meta name=\"author\" content=\"Martijn van Groningen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Martijn van Groningen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/\",\"url\":\"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/\",\"name\":\"Apache Solr - Grouping update - Trifork Blog\",\"isPartOf\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#website\"},\"datePublished\":\"2011-10-03T05:30:50+00:00\",\"author\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/72d3e6a70910facfdef86dd93ced0e57\"},\"breadcrumb\":{\"@id\":\"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/trifork.nl\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apache Solr &#8211; Grouping update\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/trifork.nl\/blog\/#website\",\"url\":\"https:\/\/trifork.nl\/blog\/\",\"name\":\"Trifork Blog\",\"description\":\"Keep updated on the technical solutions Trifork is working on!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/trifork.nl\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/72d3e6a70910facfdef86dd93ced0e57\",\"name\":\"Martijn van Groningen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/505caa844fb66f275a027798c993c363?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/505caa844fb66f275a027798c993c363?s=96&d=mm&r=g\",\"caption\":\"Martijn van Groningen\"},\"url\":\"https:\/\/trifork.nl\/blog\/author\/martijn\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Solr - Grouping update - Trifork Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/","og_locale":"en_US","og_type":"article","og_title":"Apache Solr - Grouping update - Trifork Blog","og_description":"Apache Solr&#8217;s result grouping feature is now a widely used feature. The major drawback was that grouping (also known as sharding in Solr) was initially not supported for distributed searches. The good news is that recently distributed grouping has been added to Solr! It has been added as the trunk and the stable branch (branch3x). [&hellip;]","og_url":"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/","og_site_name":"Trifork Blog","article_published_time":"2011-10-03T05:30:50+00:00","author":"Martijn van Groningen","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Martijn van Groningen","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/","url":"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/","name":"Apache Solr - Grouping update - Trifork Blog","isPartOf":{"@id":"https:\/\/trifork.nl\/blog\/#website"},"datePublished":"2011-10-03T05:30:50+00:00","author":{"@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/72d3e6a70910facfdef86dd93ced0e57"},"breadcrumb":{"@id":"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/trifork.nl\/blog\/apache-solr-grouping-update\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/trifork.nl\/blog\/"},{"@type":"ListItem","position":2,"name":"Apache Solr &#8211; Grouping update"}]},{"@type":"WebSite","@id":"https:\/\/trifork.nl\/blog\/#website","url":"https:\/\/trifork.nl\/blog\/","name":"Trifork Blog","description":"Keep updated on the technical solutions Trifork is working on!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/trifork.nl\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/72d3e6a70910facfdef86dd93ced0e57","name":"Martijn van Groningen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/505caa844fb66f275a027798c993c363?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/505caa844fb66f275a027798c993c363?s=96&d=mm&r=g","caption":"Martijn van Groningen"},"url":"https:\/\/trifork.nl\/blog\/author\/martijn\/"}]}},"_links":{"self":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/5989","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/comments?post=5989"}],"version-history":[{"count":0,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/5989\/revisions"}],"wp:attachment":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/media?parent=5989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/categories?post=5989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/tags?post=5989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}