Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SimplePosttool: FATAL: specifying either url or core/collection is mandatory

Tags:

solr

lucene

I'm new in solr and I want to start an example that is in the exampledocs folder , but when I try to start it using the windows prompt I have the error message in the title. Someone can help me?

like image 938
user3541711 Avatar asked Jun 03 '15 09:06

user3541711


2 Answers

When running the Solr Quick Start on Windows I faced the same problem. In the comments of the guide I found what worked for me:

C:\opt\solr-5.2.1>java -Dc=gettingstarted -jar example\exampledocs\post.jar example\exampledocs\*.xml

That got me the following output:

C:\opt\solr-5.2.1>java -Dc=gettingstarted -jar example\exampledocs\post.jar example\exampledocs\*.xml
SimplePostTool version 5.0.0
Posting files to [base] url http://localhost:8983/solr/gettingstarted/update using content-type application/xml...
POSTing file gb18030-example.xml to [base]
POSTing file hd.xml to [base]
POSTing file ipod_other.xml to [base]
POSTing file ipod_video.xml to [base]
POSTing file manufacturers.xml to [base]
POSTing file mem.xml to [base]
POSTing file money.xml to [base]
POSTing file monitor.xml to [base]
POSTing file monitor2.xml to [base]
POSTing file mp500.xml to [base]
POSTing file sd500.xml to [base]
POSTing file solr.xml to [base]
POSTing file utf8-example.xml to [base]
POSTing file vidcard.xml to [base]
14 files indexed.
COMMITting Solr index changes to http://localhost:8983/solr/gettingstarted/update...
Time spent: 0:00:22.043

The -Dc parameter does the trick.

On the other hand when only running with the folder docs it did not work. But this is not scope of my answer since I only wanted to show how to get it running anyhow.

like image 125
Dirk Schumacher Avatar answered Jan 04 '23 13:01

Dirk Schumacher


Start your Solr Admin

Create one core using following command:

solr create -c <name>

Select core from core_selector dropdown

click on documents and then add data to be added in the core.Format of document can be specify by you.

OR

Type this command in solr-(versioname)\example\exampledocs

java -Dc=my_core -Dtype=text/csv -jar post.jar test.csv

where my_core is corename,
type is csv and
test.csv is file to be imported.

like image 33
Rahul Darade Avatar answered Jan 04 '23 12:01

Rahul Darade