Well,

This way I connect to my server
new CommonsHttpSolrServer("http://localhost:8983/solr/?core=idxItem";)

This way I don't connect:
new CommonsHttpSolrServer("http://localhost:8983/solr/idxItem";)

As you can obviously see, I can't use the first way because it produces
wrong requests like
http://localhost:8983/solr/?core=idxItem/update?wt=xml&version=2.2

and I end up getting exceptions like these.

org.apache.solr.common.SolrException: Can_not_find_core_idxItemupdatewtxml

Can_not_find_core_idxItemupdatewtxml

request: http://localhost:8983/solr/?core=idxItem/update?wt=xml&version=2.2
    at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:308)
    at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:152)
    at
org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:220)
    at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:51)
    at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:55)
    ...

I would like to remeber that I am using solr-1.3 trunk


2008/6/3 Erik Hatcher <[EMAIL PROTECTED]>:

>
> On Jun 3, 2008, at 3:52 PM, Alexander Ramos Jardim wrote:
>
>> Is there a way to access a specific core via Solrj
>>
>
> Yes, depending on which SolrServer implementation:
>
>  SolrServer server = new CommonsHttpSolrServer("
> http://localhost:8983/solr/<corename>")
>
> -or-
>
>  SolrServer server = new EmbeddedSolrServer(solrCore)
>
>        Erik
>
>
>


-- 
Alexander Ramos Jardim

Reply via email to