小编典典

多场映射elasticsearch

elasticsearch

我正在尝试在Elasticsearch中映射多字段

  • 第一个字段-“中”应包含所有索引列,
  • 第二个字段-“ orig”应按原样包含文本。

例如:

    "findings": {
       "type": "multi_field",
       "fields": {
          "in": {
             "type": "string"
          },
          "orig": {
             "type": "string",
             "index":"not_analyzed"
          }
       }

一旦创建并查询,它就是它的外观。

当index =’no’时,是否意味着该字段将永远不会被索引?

  "findings": {
                  "type": "string",
                  "index": "no",
                  "fields": {
                     "in": {
                        "type": "string"
                     },
                     "orig": {
                        "type": "string",
                        "index": "not_analyzed"
                     }
                  }

阅读 314

收藏
2020-06-22

共1个答案

小编典典

"index" : "no"对于不同的类型有不同的含义。由于findings现场在你的问题是String它有以下根据意思elasticsearch documentation

no表示根本无法搜索(作为单个字段;它仍可能包含在_all中)。设置为no将禁用include_in_all。

您不能直接搜索字段findingsindex: no而可以使用findings.in或搜索。findings.orig

您可以在此处详细了解index财产

2020-06-22