You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2012/01/05 04:06:21 UTC
[Solr Wiki] Update of "LukeRequestHandler" by ErickErickson
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "LukeRequestHandler" page has been changed by ErickErickson:
http://wiki.apache.org/solr/LukeRequestHandler?action=diff&rev1=22&rev2=23
{{{
<requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
}}}
+
+ <!> [[Solr3.6]] <!> [[Solr4.x]]
+
+ There have been significant speed improvements in these two versions, see the discussion under the reportDocCount parameter
+
<<TableOfContents(3)>>
== Example URLs ==
@@ -180, +185 @@
* [[http://localhost:8983/solr/admin/luke?show=schema|/admin/luke?show=schema]]
+ === reportDocCount ===
+ <!> [[Solr3.6]] and subsequent 3.x releases ONLY. Not relevant for 4.x
+
+ 'reportDocCount=true | false'. Default value: false. THIS IS A CHANGE IN BEHAVIOR.
+
+ * [[http://localhost:8983/solr/admin/luke?reportDocCount='true' or 'false'|/admin/luke?reportDocCount=true]]
+
+ The Luke request handler was almost unusably slow for large indexes. It turns out that most of the time was spent gathering the number of documents that contained a field. As of Solr 3.6, the behavior is changed so that this statistic is NOT reported by default but can be reported if you specify 'true' for this parameter.
+
+ 3.x will still require some patience. Even specifying 'reportDocCount=false' still took 53 seconds on my 89M sample data, down from 640 seconds or so.
+
+ <!> [[Solr4.x]]
+
+ reportDocCount is a very short-lived parameter. The changes to the underlying Lucene index structure in the trunk (4.x) code line make gathering the number of documents that a particular field occurs in very fast. A sample index with 89M documents took on the order of 450 seconds under the original structure (i.e. getting range queries for each field with field:[* TO *]). Using more efficient 4.x ways of collecting that data, it took 160 seconds. Using really efficient techniques available in 4.x, it is down around 16 seconds. So the reportDocCount parameter seems unnecessary and is removed in the 4.x code line.
+
+ Notes:
+ * In the 4.x code line, the document count returned will ''include'' deleted documents if there are any. If exact counts are required, you can optimize the index before calling this handler.
+ * numTerms is still supported in both versions and will cause only the definitions in schema.xml to be returned, no statistics from the index will be included.
+ * See SOLR-1931 for all the details.
+
Sample Output
{{{