elasticsearch 从elasticsearch中没有得到术语向量结果?,elasticsearch,kibana,elasticsearch,Kibana" /> elasticsearch 从elasticsearch中没有得到术语向量结果?,elasticsearch,kibana,elasticsearch,Kibana" />

elasticsearch 从elasticsearch中没有得到术语向量结果?

elasticsearch 从elasticsearch中没有得到术语向量结果?,elasticsearch,kibana,elasticsearch,Kibana,我正在跟踪,但无法获得预期的结果。我做错了哪一部分 文件的格式如下: PUT integrity { "mappings": { "body": { "properties": { "label": { "type": "keyword", "index": "not_analyzed", "store": true }, "body": { "

我正在跟踪,但无法获得预期的结果。我做错了哪一部分

文件的格式如下:

PUT integrity
{
  "mappings": {
    "body": {
      "properties": {
        "label": {
          "type": "keyword",
          "index": "not_analyzed",
          "store": true
        },
        "body": {
          "type": "text",
          "store": true
        }
      }
    }
  }
}

\u all
字段的默认映射不包括存储术语向量:

    "_all": {
      "full_name": "_all",
      "mapping": {
        "_all": {
          "enabled": true,
          "store": false,
          "store_term_vectors": false,
          "store_term_vector_offsets": false,
          "store_term_vector_positions": false,
          "store_term_vector_payloads": false,
          "norms": true,
          "analyzer": "default",
          "similarity": "BM25"
        }
      }
    }
而且,似乎
\u all
字段有点特殊,而Elasticsearch没有

\u all
的唯一选项是在其上启用术语向量:

PUT integrity
{
  "mappings": {
    "body": {
      "_all": {
        "term_vector": "with_positions_offsets"
      }, 
      "properties": {
        "label": {
          "type": "keyword",
          "index": "not_analyzed",
          "store": true
        },
        "body": {
          "type": "text",
          "store": true
        }
      }
    }
  }
}
我将“字段”更改为[“body”],但仍然不起作用。听起来我需要用你的方法重建索引?