Re: EmbeddedSolrServer API usage

2009-07-15 Thread Erik Hatcher
ays running for some reason. Is this the proper way to use EmbeddedSolrServer, or are there some tips to improving the code and reducing the duplication? Also, why does the JVM keep running? Are we spinning off a thread that needs to be shut down? Is there some sort of close() call that is needed? Thanks, Erik -- View this message in context: http://www.nabble.com/EmbeddedSolrServer-API-usage-tp19778623p24502310.html Sent from the Solr - Dev mailing list archive at Nabble.com.

Re: EmbeddedSolrServer API usage

2009-07-15 Thread Ravish007
solr.query(query); >>> System.out.println("response = " + response); >>> } >>> >>> This works, but has a fair bit of seemingly unnecessary >>> duplication, and it also leaves the JVM stays running for some >>> reason. >>> >>> Is this the proper way to use EmbeddedSolrServer, or are there some >>> tips to improving the code and reducing the duplication? >>> >>> Also, why does the JVM keep running? Are we spinning off a thread >>> that needs to be shut down? Is there some sort of close() call >>> that is needed? >>> >>> Thanks, >>> Erik >>> > > > -- View this message in context: http://www.nabble.com/EmbeddedSolrServer-API-usage-tp19778623p24502310.html Sent from the Solr - Dev mailing list archive at Nabble.com.

Re: EmbeddedSolrServer API usage

2008-10-08 Thread Grant Ingersoll
So, the answer to my own ? is: I was getting: java.lang.NullPointerException at org.apache.solr.core.CoreContainer.create(CoreContainer.java:315) at com.grantingersoll.noodles.EmbeddedTest.testEmbedded(EmbeddedTest.java: 23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nat

Re: EmbeddedSolrServer API usage

2008-10-08 Thread Grant Ingersoll
I get an NPE in create when trying this. Seems the loader member is not instantiated for the container.create() call, since load is not called. On Oct 2, 2008, at 10:37 AM, Ryan McKinley wrote: You could also use the CoreContainer to create a Core from the descriptor: CoreContainer

Re: EmbeddedSolrServer API usage

2008-10-02 Thread Ryan McKinley
On Oct 2, 2008, at 1:58 PM, Erik Hatcher wrote: Thanks Ryan - good tips, and core.close() was the missing piece, duh. Here's how it looks in JRuby: container = CoreContainer.new descriptor = CoreDescriptor.new(container, "core1", "/Users/erik/ apache-solr-1.3.0/example/solr") core = cont

Re: EmbeddedSolrServer API usage

2008-10-02 Thread Erik Hatcher
Thanks Ryan - good tips, and core.close() was the missing piece, duh. Here's how it looks in JRuby: container = CoreContainer.new descriptor = CoreDescriptor.new(container, "core1", "/Users/erik/ apache-solr-1.3.0/example/solr") core = container.create(descriptor) container.register("c

Re: EmbeddedSolrServer API usage

2008-10-02 Thread Ryan McKinley
You could also use the CoreContainer to create a Core from the descriptor: CoreContainer container = new CoreContainer(); CoreDescriptor descriptor = new CoreDescriptor(container, "core1", "/Users/erik/apache-solr-1.3.0/example/solr"); SolrCore core = container.create( descr

EmbeddedSolrServer API usage

2008-10-02 Thread Erik Hatcher
I'm doing some Java experiments to get ready for a solr-ruby overhaul such that JRuby comes into play nicely so that EmbeddedSolrServer can be used transparently too. I've not tried this since the whole CoreContainer/CoreDescriptor stuff was added, and I don't quite understand it all. Her