lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan McKinley <ryan...@gmail.com>
Subject Re: Problem in setting the request writer in SolrJ (wiki page wrong?)
Date Mon, 23 Aug 2010 20:40:27 GMT
Note that the 'setRequestWriter' is not part of the SolrServer API, it
is on the CommonsHttpSolrServer:
http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.html#setRequestWriter%28org.apache.solr.client.solrj.request.RequestWriter%29

If you are using EmbeddedSolrServer, the params are not serialized via
RequestWriter, so you don't have any options there.

ryan


On Mon, Aug 23, 2010 at 9:24 AM, Constantijn Visinescu
<baelin82@gmail.com> wrote:
> Hello,
>
> I'm using an embedded solrserver in my Java webapp, but as far as i
> can tell it's defaulting to sending updates in XML, which seems like a
> huge waste compared to sending it in Java binary format.
>
> According to this page:
> http://wiki.apache.org/solr/Solrj#Setting_the_RequestWriter
>
> I'm supposed to be able to set the requestwriter like so:
> server.setRequestWriter(new BinaryRequestWriter());
>
> However this method doesn't seem to exists in the SolrServer class of
> SolrJ 1.4.1 ?
>
> How do i set it to process updates in the java binary format?
>
> Thanks in advance,
> Constantijn Visinescu
>
> P.S.
> I'm creating my SolrServer instance like this:
>        private SolrServer solrServer;
>        CoreContainer container = new CoreContainer.Initializer().initialize();
>        solrServer = new EmbeddedSolrServer(container, "");
>
> this solrServer wont let me set a request writer.
>

Mime
View raw message