You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2014/08/31 17:55:20 UTC

[jira] [Created] (SOLR-6456) SolrServer: add setRequestWriter and setParser

David Smiley created SOLR-6456:
----------------------------------

             Summary: SolrServer: add setRequestWriter and setParser
                 Key: SOLR-6456
                 URL: https://issues.apache.org/jira/browse/SOLR-6456
             Project: Solr
          Issue Type: Improvement
          Components: clients - java
            Reporter: David Smiley


Nearly every subclass of SolrServer supports setRequestWriter & setParser.  It's crazy that if you have to cast your SolrServer to it's particular subclass implementation.  I want to have code like this without the cast:
{code:java}
    if (useXml) {
      solrServer.setRequestWriter(new RequestWriter());
      solrServer.setParser(new XMLResponseParser());
    } else {//javabin
      solrServer.setRequestWriter(new BinaryRequestWriter());
      solrServer.setParser(new BinaryResponseParser());
    }
{code}
EmbeddedSolrServer could simply log a warning... treating matters like this as a hint.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org