From c982fdedd6958a138d44d72d8a4d5e02e5f74443 Mon Sep 17 00:00:00 2001 From: Mike Klaas Date: Mon, 27 Nov 2006 22:40:21 +0000 Subject: [PATCH] SOLR-52 lazyfields patch implemented. I am going to commit this with solrconfig defaulting to disabling lazyfields and use it in my application. When I'm satisfied with the behaviour, I'll close SOLR-52 and perhaps enable lazyfields as the default option. git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@479793 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 + example/solr/conf/solrconfig.xml | 4 + .../solr/request/DisMaxRequestHandler.java | 3 + .../solr/request/JSONResponseWriter.java | 2 +- .../solr/request/StandardRequestHandler.java | 5 +- .../org/apache/solr/request/XMLWriter.java | 17 ++-- .../org/apache/solr/schema/BCDIntField.java | 5 +- .../org/apache/solr/schema/BCDLongField.java | 4 +- .../org/apache/solr/schema/BCDStrField.java | 4 +- .../org/apache/solr/schema/BoolField.java | 5 +- .../apache/solr/schema/CompressableField.java | 1 + .../org/apache/solr/schema/DateField.java | 5 +- .../org/apache/solr/schema/DoubleField.java | 3 +- .../org/apache/solr/schema/FieldType.java | 4 +- .../org/apache/solr/schema/FloatField.java | 3 +- .../org/apache/solr/schema/IndexSchema.java | 7 +- src/java/org/apache/solr/schema/IntField.java | 3 +- .../org/apache/solr/schema/LongField.java | 3 +- .../org/apache/solr/schema/SchemaField.java | 2 +- .../solr/schema/SortableDoubleField.java | 5 +- .../solr/schema/SortableFloatField.java | 5 +- .../apache/solr/schema/SortableIntField.java | 5 +- .../apache/solr/schema/SortableLongField.java | 5 +- src/java/org/apache/solr/schema/StrField.java | 3 +- .../org/apache/solr/schema/TextField.java | 3 +- .../apache/solr/search/SolrIndexSearcher.java | 86 ++++++++++++++++--- .../apache/solr/util/HighlightingUtils.java | 18 +++- .../org/apache/solr/util/SolrPluginUtils.java | 53 ++++++++++++ .../apache/solr/BasicFunctionalityTest.java | 45 +++++++++- src/test/test-files/solr/conf/solrconfig.xml | 5 ++ 30 files changed, 244 insertions(+), 71 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1231b0753d7..ea4ba438fbb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -88,6 +88,8 @@ Changes in runtime behavior (hossman, SOLR-25) 8. Document update handling locking is much sparser, allowing performance gains through multiple threads. Large commits also might be faster (klaas, SOLR-65) + 9. Lazy field loading can be enabled via a solrconfig directive. This will be faster when + not all stored fields are needed from a document (klaas, SOLR-52) Optimizations 1. getDocListAndSet can now generate both a DocList and a DocSet from a diff --git a/example/solr/conf/solrconfig.xml b/example/solr/conf/solrconfig.xml index 6be4a9c363a..34844fdbae6 100755 --- a/example/solr/conf/solrconfig.xml +++ b/example/solr/conf/solrconfig.xml @@ -132,6 +132,10 @@ initialSize="512" autowarmCount="0"/> + + false + + true +