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

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

问题描述

这里是 Solr 新手.

Solr newbie here.

我创建了一个 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.

推荐答案

可能您没有正确设置 .请参阅这个问题.

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天全站免登陆