Word-oriented completion suggester (ElasticSearch 5.x)

后端 未结 3 948
离开以前
离开以前 2020-12-05 02:47

ElasticSearch 5.x introduced some (breaking) changes to the Suggester API (Documentation). Most notable change is the following:

Completion su

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-05 03:45

    We face exactly the same problem. In Elasticsearch 2.4 the approach like you describe used to work fine for us but now as you say the suggester has become document-based while like you we are only interested in unique words, not in the documents.

    The only 'solution' we could think of so far is to create a separate index just for the words on which we want to perform the suggestion queries and in this separate index make sure somehow that identical words are only indexed once. Then you could perform the suggestion queries on this separate index. This is far from ideal, if only because we will then need to make sure that this index remains in sync with the other index that we need for our other queries.

提交回复
热议问题