Skip to content

Elasticsearch: Merge requests with title completion

Description

This is the first merge request to support merge request search-as-you-type for GitLab Duo #491727 (closed). Here, we will use the title field differently to support search-as-you-type with a recommended analyzer for this purpose.

This adds the following mapping:

"title" : {
  "type" : "text",
  "fields" : {
    "completion" : {
      "type" : "search_as_you_type",
      "doc_values" : false,
      "max_shingle_size" : 3,
      "analyzer" : "title_completion_analyzer"
    }
  },
  "analyzer" : "title_analyzer"
}

Search-as-you-type field type is supported in both Elasticsearch and OpenSearch:

References:

Related to #479051 (closed)

Merge request reports

Loading