Re: correct usage of StreamingUpdateSolrServer?

2012-02-13 Thread Torsten Krah
Whats the output of jstack $PID ?
If the program does not exit, there must be some non-daemon threads
still running.



smime.p7s
Description: S/MIME cryptographic signature


Re: correct usage of StreamingUpdateSolrServer?

2012-02-10 Thread Erick Erickson
Well, that's certainly "hello world" .

But I'm kinda stumped, I have programs that look an awful lot like
this that terminate just fine.

Anything in your Solr logs? And are you just executing this once?
And what version of Solr are you using?

Best
Erick

On Fri, Feb 10, 2012 at 3:49 PM, T Vinod Gupta  wrote:
> 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 docs = new
> ArrayList();
>        docs.add(doc1);
>        solrServer.add(docs);
>        solrServer.commit();
>
> thanks
>
> On Fri, Feb 10, 2012 at 7:41 AM, Erick Erickson 
> 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 
>> 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
>>


Re: correct usage of StreamingUpdateSolrServer?

2012-02-10 Thread T Vinod Gupta
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 docs = new
ArrayList();
docs.add(doc1);
solrServer.add(docs);
solrServer.commit();

thanks

On Fri, Feb 10, 2012 at 7:41 AM, Erick Erickson 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 
> 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
>


Re: correct usage of StreamingUpdateSolrServer?

2012-02-10 Thread Erick Erickson
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  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


correct usage of StreamingUpdateSolrServer?

2012-02-09 Thread T Vinod Gupta
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