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 "Benjamin, Roy" <rb...@ebay.com> on 2012/08/02 22:42:24 UTC
How to update a core using SolrJ
I'm using SolrJ and CommonsHttpSolrServer.
Before moving to multi-core configuration I constructed CommonsHttpSolrServer from "http://localhost:8080/solr", this worked fine.
Now I have two cores. I have tried contructing CommonsHttpSolrServer from "http://localhost:8080/solr/core0" but this does
not work. The resource is not found when I try to add docs.
How do I update Solr using SolrJ in a multi-core configuration? What is the correct form for the CommonsHttpSolrServer URL?
Thanks!
Roy
Re: How to update a core using SolrJ
Posted by Chantal Ackermann <c....@it-agenten.com>.
Hi Roy,
the example URL is correct if your core is available under that name (configured in solr.xml) and has started without errors. I think I observed that it makes a different whether there is a trailing slash or not (but that was a while ago, so maybe that has changed).
If you can reach that URL via browser but SolrJ with exactly the same URL cannot, then
- maybe the SolrJ application is running in a different environment?
- there is authentication setup and you are authenticated via browser but SolrJ does not know of it
- ...?
Some log output would be definitely helpful.
Cheers,
Chantal
Am 02.08.2012 um 22:42 schrieb Benjamin, Roy:
> I'm using SolrJ and CommonsHttpSolrServer.
>
> Before moving to multi-core configuration I constructed CommonsHttpSolrServer from "http://localhost:8080/solr", this worked fine.
>
> Now I have two cores. I have tried contructing CommonsHttpSolrServer from "http://localhost:8080/solr/core0" but this does
> not work. The resource is not found when I try to add docs.
>
> How do I update Solr using SolrJ in a multi-core configuration? What is the correct form for the CommonsHttpSolrServer URL?
>
> Thanks!
>
> Roy