Implementing Elasticsearch Completion Suggester

Created on 17 October 2018, over 5 years ago
Updated 20 September 2023, 9 months ago

I'm trying to implement the Completion Suggester functionality in Elasticsearch. In order to do so, it looks like I need to index certain fields differently in order to use this functionality.

For example,

curl -XPOST "http://localhost:9200/address/address" -d'
{
  "suggest" : {
    "input" : "511 Church St, Richmond, Vic 3121",
    "weight" : 1234
  }
}'

How would I do this? I think I need to implement a processor for this? Or is there some kind of alter hook that I should use to change the data structure of the document being indexed?

πŸ’¬ Support request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ebeyrent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡§πŸ‡ͺBelgium sandervancamp Antwerp

    @ebeyrent could you maybe share how you did this. I managed to create a custom SearchApiDataType but I can't get the mapping to work on my server. I'm really struggling finding the right documentation for this.

Production build 0.69.0 2024