标记慢速弹性搜索建议查询 [英] Tagging Slow Elastic Search Suggest Query

查看:58
本文介绍了标记慢速弹性搜索建议查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的ElasticSearch群集位于AWS云中,并且版本7.8.我想标记我的ElasticSearch建议查询,以便一旦在慢速建议查询日志中找到慢速建议查询,就可以确定谁是慢速建议查询的发起者.我收到了来自@Val 的我的

My ElasticSearch cluster is in AWS cloud and is on version 7.8. I want to tag my elasticSearch suggest queries so that I can identify who are the originators of the slow suggest queries once I have them in the slow suggest query log. I received a response from @Val for my query question who suggested that suggest queries are named by default so we can use it but I am unable to understand how ? Can someone suggest what to do ? What should be the field so that it doesn't add to additional latency ? I tried with the query below.

POST kibana_sample_data_ecommerce/_search
{
  "suggest": {
    "_name" : {
      "text" : "ClientIdAndTraceId",
      "term" : {
        "field" : "What should be the field here ?"
      }
    },
    "my-suggest-1" : {
      "text" : "Oceanavigations",
      "term" : {
        "field" : "manufacturer"
      }
    }
  }
}

我无法理解该字段是什么,以便它不会增加额外的延迟或查询超时?如果还有其他选择,也请让我知道.

I am unable to understand what should be the field so that it doesn't add to additional latency or query getting timed out ? If there is any other alternative then please let me know that too.

推荐答案

对于建议者,无法添加查询名称.

For suggesters, it's not possible to add names like for queries.

您可以尝试使用建议查询的名称(即 my-suggest-1 )标记建议查询

What you could maybe try is to use the name of the suggest query (i.e. my-suggest-1) to tag the suggest query

POST kibana_sample_data_ecommerce/_search
{
  "suggest": {
    "use-this-name-to-tag-your-suggest-query" : {        <------- see this
      "text" : "Oceanavigations",
      "term" : {
        "field" : "manufacturer"
      }
    }
  }
}

这篇关于标记慢速弹性搜索建议查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆