From 0cda9c8825a0ba535fc440e9cffdc053b642e417 Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Mon, 28 Jul 2008 11:20:49 +0000 Subject: [PATCH] SOLR-611 -- Expose sort_values returned by QueryComponent in SolrJ's QueryResponse git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@680319 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ .../apache/solr/client/solrj/response/QueryResponse.java | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index c6aeaa7aa62..9781716a028 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -323,6 +323,8 @@ New Features 61. SOLR-522: Make analysis.jsp show payloads. (Tricia Williams via yonik) +62. SOLR-611: Expose sort_values returned by QueryComponent in SolrJ's QueryResponse (Dan Rosher via shalin) + Changes in runtime behavior 1. SOLR-559: use Lucene updateDocument, deleteDocuments methods. This diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/response/QueryResponse.java b/client/java/solrj/src/org/apache/solr/client/solrj/response/QueryResponse.java index 2ede53bae9a..21270a4e39c 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/response/QueryResponse.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/response/QueryResponse.java @@ -40,6 +40,7 @@ public class QueryResponse extends SolrResponseBase // Direct pointers to known types private NamedList _header = null; private SolrDocumentList _results = null; + private NamedList _sortvalues = null; private NamedList _facetInfo = null; private NamedList _debugInfo = null; private NamedList _highlightingInfo = null; @@ -86,6 +87,9 @@ public class QueryResponse extends SolrResponseBase else if( "response".equals( n ) ) { _results = (SolrDocumentList) res.getVal( i ); } + else if( "sort_values".equals( n ) ) { + _sortvalues = (NamedList) res.getVal( i ); + } else if( "facet_counts".equals( n ) ) { _facetInfo = (NamedList) res.getVal( i ); extractFacetInfo( _facetInfo ); @@ -209,6 +213,10 @@ public class QueryResponse extends SolrResponseBase public SolrDocumentList getResults() { return _results; } + + public NamedList getSortValues(){ + return _sortvalues; + } public Map getDebugMap() { return _debugMap;