Skip to content

Create analyzer accepting any random param and returning that in response as well #85710

@amitmbm

Description

@amitmbm

Elasticsearch Version

8.1.1

Installed Plugins

None

Java Version

bundled

OS Version

macos

Problem Description

Create a custom analyzer using below request, Note foo as an param to analyzer with bar value.

PUT customanlyzerindex
{
    "settings": {
        "analysis": {
            "analyzer": {
                "my_analyzer": {
                    "type": "custom",
                    "tokenizer": "standard",
                    "foo": "bar"
                }
            }
        }
    }
}

Index is created successfully, and foo param is returned in the _settings API response.

GET customanlyzerindex/_settings

{
    "customanz": {
        "settings": {
            "index": {
                "routing": {
                    "allocation": {
                        "include": {
                            "_tier_preference": "data_content"
                        }
                    }
                },
                "number_of_shards": "1",
                "provided_name": "customanz",
                "creation_date": "1649229792216",
                "analysis": {
                    "analyzer": {
                        "my_analyzer": {
                            "type": "custom",
                            "foo": "bar",
                            "tokenizer": "standard"
                        }
                    }
                },
                "number_of_replicas": "1",
                "uuid": "zo-99vRVQD6igTzbyFMNKA",
                "version": {
                    "created": "8010199"
                }
            }
        }
    }
}

Steps to Reproduce

Same as problem Description

Logs (if relevant)

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions