开始在我的第一个本地(非云)集合/core上使用solr



因此,我能够运行solr。

如果我运行:.solr-8.3.0bin>solr status,我得到:

Found Solr process 114580 running on port 8983
{
"solr_home":".\exe\solr-8.3.0\server\solr",
"version":"8.3.0 2aa586909b911e66e1d8863aa89f173d69f86cd2 - ishan - 2019-10-25 23:15:22",
"startTime":"2019-11-06T20:45:00.322Z",
"uptime":"0 days, 1 hours, 8 minutes, 37 seconds",
"memory":"229.4 MB (%44.8) of 512 MB"}

当我尝试制作我的第一个核心:

solr-8.3.0bin> solr create -c testCore

我得到

The system cannot find the batch label specified - parse_create_args

我的java似乎工作正常:

solr-8.3.0exampleexampledocs>java -jar post.jar -h
SimplePostTool version 5.0.0
Usage: java [SystemProperties] -jar post.jar [-h|-] [<file|folder|url|arg> [<file|folder|url|arg>...]]
Supported System Properties and their defaults:
-Dc=<core/collection>
-Durl=<base Solr update URL> (overrides -Dc option if specified)
-Ddata=files|web|args|stdin (default=files)
-Dtype=<content-type> (default=application/xml)
-Dhost=<host> (default: localhost)
-Dport=<port> (default: 8983)
-Dbasicauth=<user:pass> (sets Basic Authentication credentials)
-Dauto=yes|no (default=no)
-Drecursive=yes|no|<depth> (default=0)
-Ddelay=<seconds> (default=0 for files, 10 for web)
-Dfiletypes=<type>[,<type>,...] (default=xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log)
-Dparams="<key>=<value>[&<key>=<value>...]" (values must be URL-encoded)
-Dcommit=yes|no (default=yes)
-Doptimize=yes|no (default=no)
-Dout=yes|no (default=no)
This is a simple command line tool for POSTing raw data to a Solr port.
NOTE: Specifying the url/core/collection name is mandatory.
Data can be read from files specified as commandline args,
URLs specified as args, as raw commandline arg strings or via STDIN.
Examples:
java -Dc=gettingstarted -jar post.jar *.xml
java -Ddata=args -Dc=gettingstarted -jar post.jar '<delete><id>42</id></delete>'
java -Ddata=stdin -Dc=gettingstarted -jar post.jar < hd.xml
java -Ddata=web -Dc=gettingstarted -jar post.jar http://example.com/
java -Dtype=text/csv -Dc=gettingstarted -jar post.jar *.csv
java -Dtype=application/json -Dc=gettingstarted -jar post.jar *.json
java -Durl=http://localhost:8983/solr/techproducts/update/extract -Dparams=literal.id=pdf1 -jar post.jar solr-word.pdf
java -Dauto -Dc=gettingstarted -jar post.jar *
java -Dauto -Dc=gettingstarted -Drecursive -jar post.jar afolder
java -Dauto -Dc=gettingstarted -Dfiletypes=ppt,html -jar post.jar afolder
The options controlled by System Properties include the Solr
URL to POST to, the Content-Type of the data, whether a commit
or optimize should be executed, and whether the response should
be written to STDOUT. If auto=yes the tool will try to set type
automatically from file name. When posting rich documents the
file name will be propagated as "resource.name" and also used
as "literal.id". You may override these or any other request parameter
through the -Dparams property. To do a commit only, use "-" as argument.
The web mode is a simple crawler following links within domain, default delay=10s.

您可以使用:

solr create_core -c testCore

这应该会创建你的核心

我也遇到了同样的问题。在命令末尾传递端口号可以修复它。试试这个:

solr create -c testCore -p 8983

使用版本7.7.x解决了这些问题。

所以我在Windows上的Solr 8.3.1中遇到了这个问题(特别是删除示例集合(。我想我会把我得到的解决方案粘贴起来,以防其他人出现在这里。

要创建示例,请使用:

java -jar -Dc=techproducts -Dauto -Dport=7333 exampleexampledocspost.jar exampleexampledocs*

要删除示例,请使用:

java -jar -Ddata=args -Dc=techproducts -Dport=7333 example/exampledocs/post.jar '<delete><query>*:*</query></delete>'

(注意,我把这个例子放在7333端口上,它不是默认的。(

最新更新