DisMax 解析用户查询,q 或 fq 过滤结果
我使用 PHP 来获取用户搜索查询,并通过 SOLR 在特定字段“关键字”上运行它们,该字段本质上包含文档中所有数据的串联。
我还在该查询上使用方面来进一步深入了解结果集。
我的问题:
- 我应该使用 SOLR DisMax 来解析所有用户查询吗?
- 进行分面深入搜索是否被认为是不好的做法 直接使用关键字搜索进行标准查询或者我应该使用 filterqueries 来过滤原始标准查询及其结果集?
I am using PHP to grab user search queries and running them through SOLR on a specific field "keyword" which contains essentially a concatenation of all of the data in the document.
I am also using facets on this query to further drill down on the result set.
My questions:
- Should I be using SOLR DisMax to parse ALL user query?
- Is it considered bad practice to put the faceted drill-down searches
directly into a standard query with the keyword search OR should I be using
filterqueries to filter the original standard query and it's resultset?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我会使用
eDisMax
,它基本上更强大、更宽容(这意味着它通常不会为格式错误的查询返回错误)。我强烈建议使用过滤查询来过滤结果(
fq< /code> 参数)例如单击某个方面条目,主要出于以下原因:
I would use
eDisMax
, it's basically more powerful and more tolerant (it means it usually doesn't return errors for malformed queries).I'd strongly recommend to use filter queries to filter your results (
fq
parameter) clicking for example on a facet entry, mainly for these reasons:查询解析器的选择取决于您的要求。 Should_I_use_the_standard_or_dismax_Query_Parser
Dismax/Edismax 允许您在多个字段上查询和提升,但有一些限制操作员的处理及其支持。
如果您查询单个字段,标准查询解析器可以满足要求。
正如@javanna 提到的
您应该始终尝试使用过滤器查询来对抗关键字搜索,因为它允许 通过缓存支持进行过滤。
The choice of query parser depends upon your requirement. Should_I_use_the_standard_or_dismax_Query_Parser
Dismax/Edismax allows you to query and boost on multiple fields, but has some limitations with handling of operators and their support.
If you are querying on a single field, Standard query parser can serve the requirement.
And as mentioned by @javanna
You should always try to use filter queries as against the search on the keywords, as it allows filtering with cache support.