Lucene(.Net)中是否存在WHERE子句?

发布于 2024-09-13 23:42:33 字数 246 浏览 1 评论 0原文

我正在构建一个 ASP.NET MVC 站点,我想在其中使用 Lucene.Net 进行全文搜索。我的网站将分为某些类别,我希望允许用户在特定类别或所有类别内进行搜索。

为了实现这一点,我计划在索引中的所有文档中创建一个术语,其中包含它们所在类别的名称。查询索引时,如果用户仅需要执行包含 WHERE 子句的查询想要某一类别的结果。

Lucene/Lucene.Net 中是否存在这样的 WHERE 子句功能?

I'm building an ASP.NET MVC site where I want to use Lucene.Net for full-text search. My site will be divided into certain categories, and I want to allow users to search inside a specific category or inside all categories.

To accomplish this, I plan to create a term in all documents in my index that contains the name of the category that they're in. When querying the index, I would need to execute a query that contains a WHERE clause if the user only wants results from one category.

Does such WHERE clause functionality exist in Lucene/Lucene.Net?

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

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