From 214bfc6f5feda657813eaa0933d3a37852e3d080 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Thu, 25 Mar 2010 18:38:26 +0000 Subject: [PATCH] SOLR-1379: fix term component so fields are map elements git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@927533 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 24 ++++++++++++++----- .../handler/component/TermsComponent.java | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) 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 is deprecated (SOLR-1696) +* Old syntax of 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) {