Add a search_as_you_type data type

Created on 20 March 2023, over 1 year ago

Problem/Motivation

OpenSearch provides a simple way to set up autocomplete by defining a field as search_as_you_type. This creates a number of ngram sub-fields, in addition to the root field, with various shingle token filters.

https://opensearch.org/docs/latest/search-plugins/searching-data/autocom...

Steps to reproduce

Proposed resolution

Add a new search_as_you_type data type.

In order to perform a query on this field you need to use a match_phrase_prefix query with syntax like the following:

GET shakespeare/_search
{
  "query": {
    "match_phrase_prefix": {
      "title": "test
    }
  },
  "size": 3
}

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

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

Comments & Activities

Production build 0.71.5 2024