SOLR-977 -- version=2.2 is not necessary for wt=javabin

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@745392 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2009-02-18 06:27:20 +00:00
parent 5cfb336f5c
commit bbda7419e5
2 changed files with 8 additions and 1 deletions

View File

@ -43,6 +43,11 @@ public class BinaryResponseParser extends ResponseParser {
} }
} }
public String getVersion() {
return "1";
}
public NamedList<Object> processResponse(Reader reader) { public NamedList<Object> processResponse(Reader reader) {
throw new RuntimeException("Cannot handle character stream"); throw new RuntimeException("Cannot handle character stream");
} }

View File

@ -262,7 +262,9 @@ public class CommonsHttpSolrServer extends SolrServer
// The parser 'wt=' and 'version=' params are used instead of the original params // The parser 'wt=' and 'version=' params are used instead of the original params
ModifiableSolrParams wparams = new ModifiableSolrParams(); ModifiableSolrParams wparams = new ModifiableSolrParams();
wparams.set( CommonParams.WT, parser.getWriterType() ); wparams.set( CommonParams.WT, parser.getWriterType() );
if(parser.getClass() != BinaryResponseParser.class ){
wparams.set( CommonParams.VERSION, parser.getVersion()); wparams.set( CommonParams.VERSION, parser.getVersion());
}
if( params == null ) { if( params == null ) {
params = wparams; params = wparams;
} }