Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the default address of Solr Server (Solr 4.0) for use from a SolrJ client

Tags:

solr

solrj

I'm trying to connect with Solr Server from a SolrJ client, but it gives an HTTPResponse Exception.

Here's my code:

SolrServer server = new HttpSolrServer("http://"localhost":8983/solr/");

Here's the exception:

java.lang.NoClassDefFoundError: org/apache/http/NoHttpResponseException:

Does Solr have a default address? Where can you find it?

like image 721
EternallyCurious Avatar asked Apr 21 '13 08:04

EternallyCurious


1 Answers

I am not familiar with SolrJ - but the endpoint seems to be missing the core name to me.

You would need to point your Solr client to a particular core.

The URI for the core would look like this (for reloading core command)

http://localhost:8983/solr/{{solrCoreName}}

The admin UI should be accessible at

http://localhost:8983/solr
like image 112
Srikanth Venugopalan Avatar answered Nov 16 '22 02:11

Srikanth Venugopalan