Solr:示例电影的索引不';我不返回任何结果
我刚开始学习Solr,当我在“films”示例中创建索引时,我在Solr Admin中只得到了5个文档,这当然是错误的。以下是我遵循的步骤:Solr:示例电影的索引不';我不返回任何结果,solr,Solr,我刚开始学习Solr,当我在“films”示例中创建索引时,我在Solr Admin中只得到了5个文档,这当然是错误的。以下是我遵循的步骤: bin/solr stop rm server/logs/*.log rm -Rf server/solr/films/ bin/solr start bin/solr create -c films curl http://localhost:8983/solr/films/schema -X POST -H 'Content-type:applicat
bin/solr stop
rm server/logs/*.log
rm -Rf server/solr/films/
bin/solr start
bin/solr create -c films
curl http://localhost:8983/solr/films/schema -X POST -H 'Content-type:application/json' --data-binary '{
"add-field" : {
"name":"name",
"type":"text_general",
"multiValued":false,
"stored":true
},
"add-field" : {
"name":"initial_release_date",
"type":"pdate",
"stored":true
}
}'
bin/post -c films example/films/films.json
curl http://localhost:8983/solr/films/config/params -H 'Content-type:application/json' -d '{
"update" : {
"facets": {
"facet.field":"genre"
}
}
}'
我在搜索时什么也没有得到:
我错过了什么?我甚至试图删除solr并重新安装它,但没有成功
从SolAdmin我可以看到核心中有1100个文档
非常感谢,非常感谢您提供任何线索。当您进行查询时
q=batman
您没有提到要搜索的字段。通常的Solr语法是字段:value
。在您的情况下,我假设它应该是q=name:batman
作为附加信息-如果未指定字段,Solr将从配置中选择默认字段,但在您的情况下,很可能是索引中不存在的字段。谢谢,但是,请指定名称字段get me result,在作者的原始帖子中没有字段needed@Choix从您发送的链接-让我们开始搜索!搜索“蝙蝠侠”:我看到一个名字字段,谢谢。滚动到页面底部,您将看到不需要任何字段在页面底部有浏览搜索处理程序,您不需要通过{“set”:{“browse”:{“hl”:“on”,“hl.fl”:“name”}}添加它。您可以看到,hl.fl参数设置为name,这实际上是我们用于搜索的字段。hl代表Highlighting你是什么意思?我已经运行过了,没有指定字段的查询并不能为我得到结果,你们能启动一个聊天室,让我们去那个里吗?