Solr 模式中的 defaultSearchField 可以设置为“任意或全部”吗?领域?

发布于 2024-09-16 10:08:23 字数 302 浏览 2 评论 0原文

Solr 模式中有一个参数可以设置默认搜索字段,如下所示...

<!-- field for the QueryParser to use when an explicit fieldname is absent -->
<defaultSearchField>detail</defaultSearchField>

...但是当用户未指定时,我想搜索所有字段(除了“详细信息”之外我还有五个字段)。

如何使搜索所有字段成为默认行为?

There is a parameter in the Solr schema to set a default search field like so...

<!-- field for the QueryParser to use when an explicit fieldname is absent -->
<defaultSearchField>detail</defaultSearchField>

...But I would like to search all fields (I have five besides "detail") when the user does not specify.

How can I make search all fields the default behavior?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清音悠歌 2024-09-23 10:08:23

使用“复制字段”指令在索引时将所有字段的内容复制到“捕获所有”字段中。使用该字段作为默认搜索字段。

Use "copy field" instructions to copy the content of all fields into a "catch all" field at index time. Use that field as the default search field.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文