查询Lucene中的任意字段?
我倾向于查询特定字段,例如。
title:*The Right Way* AND text:*The Right Way*
有没有办法在我无法提前查询的任何字段中查询正确的方式?
I tend to query for a specific field, eg.
title:*The Right Way* AND text:*The Right Way*
Is there a way to query The Right Way in any field I cannot no in advance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须使用 MultiFieldQueryParser 或者您可以创建一个字段来连接您想要搜索的内容并仅搜索该字段。
You have to parse a query using MultiFieldQueryParser or you can create a field which concatenates the content you would like to search and search only that field.