You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by dhaivat <dh...@gmail.com> on 2011/11/10 15:25:32 UTC

Multi Core indexed using SolrJ

Hello all

I have gone through the tutorials of Solrj. now i want to create multi core
indexes through solrj but i am not getting clue , so can anybody post some
example code ? 


Regards

Dhaivat

--
View this message in context: http://lucene.472066.n3.nabble.com/Multi-Core-indexed-using-SolrJ-tp3496830p3496830.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Multi Core indexed using SolrJ

Posted by dhaivat <dh...@gmail.com>.
Thanx Ivan :)

--
View this message in context: http://lucene.472066.n3.nabble.com/Multi-Core-indexed-using-SolrJ-tp3496830p3497335.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Multi Core indexed using SolrJ

Posted by Ivan Hrytsyuk <ih...@softserveinc.com>.
To create a core please take a look at
org.apache.solr.client.solrj.request.CoreAdminRequest.

To index documents try:
SolrServer#add(Collection<SolrInputDocument>);
SolrServer#commit();

On Thu, 2011-11-10 at 16:39 +0200, dhaivat wrote:

> Thanks Ivan, 
> 
> Is there any specific method using which i can create core and add documents
> in it ?
> 
> 
> Regards
> Dhaivat 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Multi-Core-indexed-using-SolrJ-tp3496830p3496869.html
> Sent from the Solr - User mailing list archive at Nabble.com.



Re: Multi Core indexed using SolrJ

Posted by dhaivat <dh...@gmail.com>.
Thanks Ivan, 

Is there any specific method using which i can create core and add documents
in it ?


Regards
Dhaivat 

--
View this message in context: http://lucene.472066.n3.nabble.com/Multi-Core-indexed-using-SolrJ-tp3496830p3496869.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Multi Core indexed using SolrJ

Posted by Ivan Hrytsyuk <ih...@softserveinc.com>.
You should create HttpSolrServer that works with a core. One
CommonsHttpSolrServer per core.
 java snippet: final CommonsHttpSolrServer solrServer = new
CommonsHttpSolrServer("http://localhost:8080/solr" + "/myCoreName");

The rest remains unchanged.

Thanks, Ivan

On Thu, 2011-11-10 at 16:25 +0200, dhaivat wrote:

> Hello all
> 
> I have gone through the tutorials of Solrj. now i want to create multi core
> indexes through solrj but i am not getting clue , so can anybody post some
> example code ? 
> 
> 
> Regards
> 
> Dhaivat
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Multi-Core-indexed-using-SolrJ-tp3496830p3496830.html
> Sent from the Solr - User mailing list archive at Nabble.com.