Solr索引似乎有效-但未返回任何结果 [英] Solr Index appears to be valid - but returns no results

查看:166
本文介绍了Solr索引似乎有效-但未返回任何结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是新手.

我已经创建了一个Solr索引,并在其中编写了大量文档.我可以看到 从Solr管理员页面可以找到该文档,并且架构也很好. 但是,当我使用测试关键字执行搜索时,没有得到任何结果.

I have created a Solr index and write a whole bunch of docs into it. I can see from the Solr admin page that the docs exist and the schema is fine as well. But when I perform a search using a test keyword I do not get any results back.

  1. 输入*时:*

  1. On entering * : *

进入查询(在Solr管理页面中),我得到了所有结果.

into the query (in Solr admin page) I get all the results.

但是,当我输入任何其他查询(例如,术语或短语)时,没有任何结果. 我已验证要查询的字段已编入索引并包含我要搜索的值.

However, when I enter any other query (e.g. a term or phrase) I get no results. I have verified that the field being queried is Indexed and contains the values I am searching for.

所以我很困惑我做错了什么.

So I am confused what I am doing wrong.

推荐答案

可能您没有正确设置<defaultSearchField>.参见此问题.

Probably you don't have a <defaultSearchField> correctly set up. See this question.

另一种可能性:您的字段的类型为string而不是text.与文本字段相比,不分析字符串字段,而是逐字存储和索引.

Another possibility: your field is of type string instead of text. String fields, in contrast to text fields, are not analyzed, but stored and indexed verbatim.

这篇关于Solr索引似乎有效-但未返回任何结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆