Skip to content

Apache Lucene open-source search software

SOLR-1379: fix term component so fields are map elements

Yonik Seeley214bfc6f5fed
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 00028025570..035cff3539c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -22,6 +22,13 @@ See the tutorial at http://lucene.apache.org/solr/tutorial.html
$Id$
================== 3.1.0-dev ==================
+Versions of Major Components
+---------------------
+Apache Lucene trunk
+Apache Tika 0.6
+Carrot2 3.1.0
+
+
Upgrading from Solr 1.4
----------------------
@@ -35,7 +42,8 @@ Upgrading from Solr 1.4
* Using solr.xml is recommended for single cores also (SOLR-1621)
-* Old syntax of <highlighting> is deprecated (SOLR-1696)
+* Old syntax of <highlighting> configuration in solrconfig.xml
+ is deprecated (SOLR-1696)
* The deprecated HTMLStripReader, HTMLStripWhitespaceTokenizerFactory and
HTMLStripStandardTokenizerFactory were removed. To strip HTML tags,
@@ -47,11 +55,11 @@ Upgrading from Solr 1.4
shorter fields, this may actually be an improvement, as the compression
used was not very good for short text. Some indexes may get larger though.
-Versions of Major Components
----------------------
-Apache Lucene trunk
-Apache Tika 0.6
-Carrot2 3.1.0
+* SOLR-1845: The TermsComponent response format was changed so that the
+ "terms" container is a map instead of a named list. This affects
+ response formats like JSON, but not XML. (yonik)
+
+
Detailed Change List
----------------------
@@ -116,6 +124,7 @@ New Features
* SOLR-1379: Add RAMDirectoryFactory for non-persistent in memory index storage.
(Alex Baranov via yonik)
+
Optimizations
----------------------
@@ -292,6 +301,9 @@ Other Changes
* SOLR-1821: Fix TimeZone-dependent test failure in TestEvaluatorBag.
(Chris Male via rmuir)
+
+
+
Build
----------------------
diff --git a/solr/src/java/org/apache/solr/handler/component/TermsComponent.java b/solr/src/java/org/apache/solr/handler/component/TermsComponent.java
index c685ec03b5f..dbb7fec025e 100644
--- a/solr/src/java/org/apache/solr/handler/component/TermsComponent.java
+++ b/solr/src/java/org/apache/solr/handler/component/TermsComponent.java
@@ -72,7 +72,7 @@ public class TermsComponent extends SearchComponent {
String lowerStr = params.get(TermsParams.TERMS_LOWER, null);
String[] fields = params.getParams(TermsParams.TERMS_FIELD);
if (fields != null && fields.length > 0) {
- NamedList terms = new NamedList();
+ NamedList terms = new SimpleOrderedMap();
rb.rsp.add("terms", terms);
int limit = params.getInt(TermsParams.TERMS_LIMIT, 10);
if (limit < 0) {