【问题标题】:Not able to cache fqueries in a bool filter using Nest 1.0无法使用 Nest 1.0 在布尔过滤器中缓存 fqueries
【发布时间】:2014-09-09 13:16:36
【问题描述】:

我需要在 bool should/must 过滤器中缓存 fqueries。示例:我想使用 Nest 生成以下 ES 查询字符串。我在这里仅将术语和通配符查询用作占位符。它们可以是任何通用查询。

"filter": {
    "bool": {
         "must": [
            {
               "fquery": {
                  "query": {
                     "term": {
                        "field1": {
                           "value": "value1"
                        }
                     }
                  },
                  "_cache": true
               }
            },
            {
               "fquery": {
                  "query": {
                     "wildcard": {
                        "field2": {
                           "value": "value2"
                        }
                     }
                  },
                  "_cache": true
               }
            }
         ]
      }
   }

我在这方面找不到任何 Nest 文档,在 Nest 代码中我只找到了如何缓存整个 bool 查询而不是单个 fqueries。

【问题讨论】:

    标签: caching elasticsearch nest


    【解决方案1】:

    我为此提交了一个问题,并添加了一个 UT 来证明这一点。找到 UT here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-11
      • 1970-01-01
      • 2021-09-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多