Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

solr multicore post data

Tags:

java

xml

solr

I am using solar application in multicore mode, and I am unable to post data(xml),when i am trying to post a data by command line(cmd windows) to solr then i get an error...

-> missing solr core name in path

so please give me detailed answer

like image 919
manish Avatar asked Sep 21 '10 10:09

manish


People also ask

Where are Solr cores stored?

Any core. properties file in any directory of your Solr installation (or in a directory under where solr_home is defined) will be found by Solr and the defined properties will be used for the core named in the file. In standalone mode, solr. xml must reside in solr_home .

What is instanceDir in Solr?

instanceDir -- The core's instance directory (i.e. the directory under which that core's conf/ and data/ directory are located) solr. core. dataDir -- The core's data directory (i.e. the directory under which that core's index directory are located)

How upload data to Solr?

Importing the DataGo to browser and open http://localhost:8983/solr to access Solr admin. Choose your Core as shown below. You should now see a new menu. Choose Data Import from the menu and you should see a view as shown below.

What is Solrconfig xml in Solr?

The solrconfig. xml file is the configuration file with the most parameters affecting Solr itself. While configuring Solr, you'll work with solrconfig. xml often, either directly or via the Config API to create "configuration overlays" ( configoverlay. json ) to override the values in solrconfig.


2 Answers

Make sure that the core name is in the path:

http://host:8983/solr/CORE/update

When using the post.jar in a multicore setup, you have to override the default url parameter with a url that contains the CORE name: java -Durl=http://... -jar post.jar

You can type java -jar post.jar -help to get the list of parameters that can be overridden.

like image 196
Pascal Dimassimo Avatar answered Sep 21 '22 01:09

Pascal Dimassimo


curl 'http://localhost:8983/solr/core0/update/csv?commit=true' --data-binary @/tmp/tmp/tmp.txt.0.0 -H "Content-type:text/plain; charset=utf-8"

The above command works for me. You have to create the csv file for solr index.

like image 41
Prasenjit Mukherjee Avatar answered Sep 18 '22 01:09

Prasenjit Mukherjee