我正在努力让熟悉的solr最终完成一个涉及索引.csv文件的学校项目。我按照以下网站上的说明进行操作:https://lucene.apache.org/solr/5_4_1/quickstart.html 特别是在Indexing CSV(逗号/列分隔值)部分下。我按照指定输入了命令(除了使用solr版本6.3.0)并且得到常量错误。
以下是我进入终端的内容:
Tylers-MacBook-Pro:6.3.0 tyler$ solr start
Archiving 1 old GC log files to /usr/local/Cellar/solr/6.3.0/server/logs/archived
Archiving 1 console log files to /usr/local/Cellar/solr/6.3.0/server/logs/archived
Rotating solr logs, keeping a max of 9 generations
Waiting up to 180 seconds to see Solr running on port 8983 [-]
Started Solr server on port 8983 (pid=20594). Happy searching!
Tylers-MacBook-Pro:6.3.0 tyler$ bin/post -c gettingstarted example/exampledocs/books.csv
java -classpath /usr/local/Cellar/solr/6.3.0/libexec/dist/solr-core-6.3.0.jar -Dauto=yes -Dc=gettingstarted -Ddata=files org.apache.solr.util.SimplePostTool example/exampledocs/books.csv
SimplePostTool version 5.0.0
Posting files to [base] url http://localhost:8983/solr/gettingstarted/update...
Entering auto mode. File endings considered are xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log
POSTing file books.csv (text/csv) to [base]
SimplePostTool: WARNING: Solr returned an error #404 (Not Found) for url: http://localhost:8983/solr/gettingstarted/update
SimplePostTool: WARNING: Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/gettingstarted/update. Reason:
<pre> Not Found</pre></p>
</body>
</html>
SimplePostTool: WARNING: IOException while reading response: java.io.FileNotFoundException: http://localhost:8983/solr/gettingstarted/update
1 files indexed.
COMMITting Solr index changes to http://localhost:8983/solr/gettingstarted/update...
SimplePostTool: WARNING: Solr returned an error #404 (Not Found) for url: http://localhost:8983/solr/gettingstarted/update?commit=true
SimplePostTool: WARNING: Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/gettingstarted/update. Reason:
<pre> Not Found</pre></p>
</body>
</html>
Time spent: 0:00:00.199
Tylers-MacBook-Pro:6.3.0 tyler$
究竟发生了什么?我所做的就是遵循我应该做的事情。谢谢你的帮助。
答案 0 :(得分:0)
尝试 bin / solr start -e techproducts 。然后使用 techproducts 而不是 gettingstarted 。再也没有 gettingstarted 集合, techproducts 是最近的集合。
你所做的就是启动一个根本没有收藏的服务器。所以你也可以在那里创建一个集合,但是你需要正确的配置来引导它。因此,第一种方法在这一点上可能会更容易一些。