Skip to content

Latest commit

 

History

History
69 lines (68 loc) · 1.95 KB

00e0c964c79fcc1876ab957da2ffce82.asciidoc

File metadata and controls

69 lines (68 loc) · 1.95 KB
resp = client.indices.create(
    index="italian_example",
    settings={
        "analysis": {
            "filter": {
                "italian_elision": {
                    "type": "elision",
                    "articles": [
                        "c",
                        "l",
                        "all",
                        "dall",
                        "dell",
                        "nell",
                        "sull",
                        "coll",
                        "pell",
                        "gl",
                        "agl",
                        "dagl",
                        "degl",
                        "negl",
                        "sugl",
                        "un",
                        "m",
                        "t",
                        "s",
                        "v",
                        "d"
                    ],
                    "articles_case": True
                },
                "italian_stop": {
                    "type": "stop",
                    "stopwords": "_italian_"
                },
                "italian_keywords": {
                    "type": "keyword_marker",
                    "keywords": [
                        "esempio"
                    ]
                },
                "italian_stemmer": {
                    "type": "stemmer",
                    "language": "light_italian"
                }
            },
            "analyzer": {
                "rebuilt_italian": {
                    "tokenizer": "standard",
                    "filter": [
                        "italian_elision",
                        "lowercase",
                        "italian_stop",
                        "italian_keywords",
                        "italian_stemmer"
                    ]
                }
            }
        }
    },
)
print(resp)