here is how i was playing with it..

        StreamingUpdateSolrServer solrServer = new
StreamingUpdateSolrServer("http://localhost:8983/solr/";, 10, 1);

        SolrInputDocument doc1 = new SolrInputDocument();
        doc1.addField( "pk_id", "id1");
        doc1.addField("doc_type", "content");
        doc1.addField( "id", "1");
        doc1.addField( "content_text", "hello world" );

        Collection<SolrInputDocument> docs = new
ArrayList<SolrInputDocument>();
        docs.add(doc1);
        solrServer.add(docs);
        solrServer.commit();

thanks

On Fri, Feb 10, 2012 at 7:41 AM, Erick Erickson <erickerick...@gmail.com>wrote:

> Can you post the code? SUSS should essentially be a drop-in
> replacement for CHSS.
>
> It's not advisable to commit after every add, it's usually better
> to use commitWithin, and perhaps commit at the very end of
> the run.
>
> Best
> Erick
>
> On Thu, Feb 9, 2012 at 4:00 PM, T Vinod Gupta <tvi...@readypulse.com>
> wrote:
> > Hi,
> > I wrote a hello world program to add documents to solr server. When I
> > use CommonsHttpSolrServer, the program exits but when I
> > use StreamingUpdateSolrServer, the program never exits. And I couldn't
> find
> > a way to close it? Are there any best practices here? Do I have to do
> > anything differently at the time of documents adds/updates when
> > using StreamingUpdateSolrServer? I am following the add/commit cycle. Is
> > that ok?
> >
> > thanks
>

Reply via email to