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
This commit is contained in:
Shalin Shekhar Mangar 2008-07-28 11:20:49 +00:00
parent da634f42eb
commit 0cda9c8825
2 changed files with 10 additions and 0 deletions

View File

@ -323,6 +323,8 @@ New Features
61. SOLR-522: Make analysis.jsp show payloads. (Tricia Williams via yonik) 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 Changes in runtime behavior
1. SOLR-559: use Lucene updateDocument, deleteDocuments methods. This 1. SOLR-559: use Lucene updateDocument, deleteDocuments methods. This

View File

@ -40,6 +40,7 @@ public class QueryResponse extends SolrResponseBase
// Direct pointers to known types // Direct pointers to known types
private NamedList<Object> _header = null; private NamedList<Object> _header = null;
private SolrDocumentList _results = null; private SolrDocumentList _results = null;
private NamedList<ArrayList> _sortvalues = null;
private NamedList<Object> _facetInfo = null; private NamedList<Object> _facetInfo = null;
private NamedList<Object> _debugInfo = null; private NamedList<Object> _debugInfo = null;
private NamedList<Object> _highlightingInfo = null; private NamedList<Object> _highlightingInfo = null;
@ -86,6 +87,9 @@ public class QueryResponse extends SolrResponseBase
else if( "response".equals( n ) ) { else if( "response".equals( n ) ) {
_results = (SolrDocumentList) res.getVal( i ); _results = (SolrDocumentList) res.getVal( i );
} }
else if( "sort_values".equals( n ) ) {
_sortvalues = (NamedList<ArrayList>) res.getVal( i );
}
else if( "facet_counts".equals( n ) ) { else if( "facet_counts".equals( n ) ) {
_facetInfo = (NamedList<Object>) res.getVal( i ); _facetInfo = (NamedList<Object>) res.getVal( i );
extractFacetInfo( _facetInfo ); extractFacetInfo( _facetInfo );
@ -209,6 +213,10 @@ public class QueryResponse extends SolrResponseBase
public SolrDocumentList getResults() { public SolrDocumentList getResults() {
return _results; return _results;
} }
public NamedList<ArrayList> getSortValues(){
return _sortvalues;
}
public Map<String, Object> getDebugMap() { public Map<String, Object> getDebugMap() {
return _debugMap; return _debugMap;