Labels are not searchable using elasticsearch

Summary

I'm not entierly sure if this is considered a bug or is by design. Label as appropriate.

When searching for issues, I'm unable to express queries that use ES operators (+, | etc.) This is meaningful, especially when trying find issues that are labeled with this OR that

Steps to reproduce

Go to https://gitlab.com/gitlab-org/gitlab-ee/issues? and Type in the search phrase: Label: backend | Label: ci-build. This results in the query: Label: backend Label: ci-build |

Example Project

https://gitlab.com/gitlab-org/gitlab-ee

What is the current bug behavior?

I'm unable to use advanced search filters on labels

What is the expected correct behavior?

Being able to search issues, milestones etc while using advanced filters.

Relevant logs and/or screenshots

Typing in this query: image

Results in this, after pressing Search/Enter image

Output of checks

This bug happens on GitLab.com and on local instance

Results of GitLab environment info

This bug happens on GitLab.com

Results of GitLab application Check

Expand for output related to the GitLab application check
This bug happens on GitLab.com

Possible fixes

Need to add Labels to indexes in ES, as they are currently omitted. This might also cover some parts of the frontend.

ES Index mapping
{
    gitlab-production: {
        mappings: {
            issue: {
                _parent: {
                    type: "project"
                },
                _routing: {
                    required: true
                },
                properties: {
                    assignee_id: {
                        type: "integer"
                    },
                    author_id: {
                        type: "integer"
                    },
                    confidential: {
                        type: "boolean"
                    },
                    created_at: {
                        type: "date"
                    },
                    description: {
                        type: "text",
                        index_options: "offsets"
                    },
                    id: {
                        type: "integer"
                    },
                    iid: {
                        type: "integer"
                    },
                    project_id: {
                        type: "integer"
                    },
                    state: {
                        type: "text"
                    },
                    title: {
                        type: "text",
                        index_options: "offsets"
                    },
                    updated_at: {
                        type: "date"
                    }
                }
            }
        }
    }
}
Edited Jun 24, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading