短语索引(Index Phrases)

短语索引(Index Phrases) #

启用短语查询的优化。当启用此参数时,Easysearch 会为短语查询构建额外的索引结构。

基本用法 #

PUT my-index
{
  "mappings": {
    "properties": {
      "content": {
        "type": "text",
        "index_phrases": true
      }
    }
  }
}

适用的字段类型 #

  • text
  • match_only_text

默认值 #

  • false

说明 #

启用 index_phrases 后,短语查询的性能会显著提高,但会增加索引大小。

相关参数 #