mirror of
https://github.com/apache/lucene.git
synced 2025-02-06 18:18:38 +00:00
SOLR-278 - modify LukeRequest/Response to handle show=schema
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@551971 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
63e36e5f9c
commit
7230a8eb3f
31
client/java/solrj/CHANGES.txt
Normal file
31
client/java/solrj/CHANGES.txt
Normal file
@ -0,0 +1,31 @@
|
||||
Apache Solr - solrj Version 1.3-dev
|
||||
Release Notes
|
||||
|
||||
Introduction
|
||||
------------
|
||||
solrj is a java client for the solr search engine.
|
||||
|
||||
|
||||
$Id$
|
||||
|
||||
================== Release 1.3-dev ==================
|
||||
|
||||
Status
|
||||
------
|
||||
This is the first release since Solrj was added to the main solr distribution.
|
||||
The following changes list changes since the code was introduced, not since
|
||||
the first official release.
|
||||
|
||||
|
||||
Detailed Change List
|
||||
--------------------
|
||||
|
||||
New Features
|
||||
|
||||
Changes in runtime behavior
|
||||
1. SOLR-278: Modify LukeRequest/Response to support SOLR-266 schema display.
|
||||
(Will Johnson via ryan)
|
||||
|
||||
Bug Fixes
|
||||
|
||||
Other Changes
|
@ -39,6 +39,7 @@ public class LukeRequest extends RequestBase
|
||||
{
|
||||
private List<String> fields;
|
||||
private int count = -1;
|
||||
private boolean showSchema = false;
|
||||
|
||||
public LukeRequest()
|
||||
{
|
||||
@ -64,6 +65,14 @@ public class LukeRequest extends RequestBase
|
||||
//---------------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
public boolean isShowSchema() {
|
||||
return showSchema;
|
||||
}
|
||||
|
||||
public void setShowSchema(boolean showSchema) {
|
||||
this.showSchema = showSchema;
|
||||
}
|
||||
|
||||
public Collection<ContentStream> getContentStreams() {
|
||||
return null;
|
||||
}
|
||||
@ -76,6 +85,9 @@ public class LukeRequest extends RequestBase
|
||||
if( count >= 0 ) {
|
||||
params.add( "count", count+"" );
|
||||
}
|
||||
if (showSchema) {
|
||||
params.add("show", "schema");
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
|
@ -111,6 +111,9 @@ public class LukeResponse extends SolrResponseBase
|
||||
indexInfo = (NamedList<Object>)res.get( "index" );
|
||||
|
||||
NamedList<Object> flds = (NamedList<Object>)res.get( "fields" );
|
||||
if (flds==null) {
|
||||
flds = (NamedList<Object>) ((NamedList<Object>)res.get( "schema" )).get("fields");
|
||||
}
|
||||
if( flds != null ) {
|
||||
fieldInfo = new HashMap<String,FieldInfo>( );
|
||||
for( Map.Entry<String, Object> field : flds ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user