elasticsearch,Autocomplete,elasticsearch" /> elasticsearch,Autocomplete,elasticsearch" />

Autocomplete ElasticSearch-自动完成的过滤项

Autocomplete ElasticSearch-自动完成的过滤项,autocomplete,elasticsearch,Autocomplete,elasticsearch,我希望自动完成以某些特定字符开头的术语。但是,在这种情况下,返回的术语不以指定的文本开头,而且更重要的是,无论前缀内容是什么,它们总是相同的。我现在使用的查询是: {"facets": {"count": {"terms": {"field":"content"}, "facet_filter": {"prefix":{"content":"wer"}}

我希望自动完成以某些特定字符开头的术语。但是,在这种情况下,返回的术语不以指定的文本开头,而且更重要的是,无论前缀内容是什么,它们总是相同的。我现在使用的查询是:

  {"facets":
      {"count":
          {"terms":
                {"field":"content"},
                 "facet_filter":
                     {"prefix":{"content":"wer"}}
          }
      },
    "size":0
  }

我想知道我错过了什么或做错了什么。非常感谢您的帮助。谢谢

可能您错过了facet\u过滤器之后的查询条目。 如果这无助于尝试针对facet的regex模式,请注意facet将在elasticsearch的未来更新中删除