gpt4 book ai didi

solr - 什么时候使用 edismax 而不是 dismax?

转载 作者:行者123 更新时间:2023-12-02 03:33:37 26 4
gpt4 key购买 nike

Solr 支持 dismax 查询解析器和 edismax 查询解析器。我们如何得出何时使用 dismax 以及何时使用 edismax 的结论?我们什么时候应该使用 edismax 而不是 dismax?

最佳答案

reference guide documents this extensively .

In addition to supporting all the DisMax query parser parameters, Extended Dismax:

  • supports the full Lucene query parser syntax.

  • supports queries such as AND, OR, NOT, -, and +.

  • treats "and" and "or" as "AND" and "OR" in Lucene syntax mode.

  • respects the 'magic field' names _val_ and _query_. These are not a real fields in the Schema, but if used it helps do special things (like a function query in the case of _val_ or a nested query in the case of _query_). If _val_ is used in a term or phrase query, the value is parsed as a function.

  • includes improved smart partial escaping in the case of syntax errors; fielded queries, +/-, and phrase queries are still supported in this mode.

  • improves proximity boosting by using word shingles; you do not need the query to match all words in the document before proximity boosting is applied.

  • includes advanced stopword handling: stopwords are not required in the mandatory part of the query but are still used in the proximity boosting part. If a query consists of all stopwords, such as "to be or not to be", then all words are required.

  • includes improved boost function: in Extended DisMax, the boost function is a multiplier rather than an addend, improving your boost results; the additive boost functions of DisMax (bf and bq) are also supported.

  • supports pure negative nested queries: queries such as +foo (-foo) will match all documents.

  • lets you specify which fields the end user is allowed to query, and to disallow direct fielded searches.

这些功能是否对您很重要取决于您自己的用例,但在大多数情况下,没有理由使用 dismax 而不是 edismax - edismax 更灵活,并且修复了多年来逐渐出现的 dismax 的一些问题.除非您有非常具体的原因,否则请选择 edismax。

关于solr - 什么时候使用 edismax 而不是 dismax?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51081559/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com