How to set default index analyzer #36
Answered
by
qcoumes
johnsonjackc
asked this question in
Q&A
-
Hello! I'm trying to set a default analyzer for all indices and am running into some difficulties. I was trying via OPENSEARCH_DSL_INDEX_SETTINGS but maybe I'm doing it wrong? Any suggestions or tips would be greatly appreciated! Here is how I have the settings:
|
Beta Was this translation helpful? Give feedback.
Answered by
qcoumes
Mar 29, 2023
Replies: 1 comment 2 replies
-
You did it the right way, it does work on my end using your exact settings on the test project: {
"country": {
"aliases": {},
"mappings": {
"properties": {
"area": {
"type": "long"
},
"continent": {
"properties": {
"id": {
"type": "long"
},
"name": {
"type": "keyword"
}
}
},
"event_count_func": {
"type": "long"
},
"event_count_property": {
"type": "long"
},
"events_id": {
"type": "long"
},
"id": {
"type": "long"
},
"name": {
"type": "text"
},
"population": {
"type": "long"
}
}
},
"settings": {
"index": {
"max_ngram_diff": "3",
"number_of_shards": "1",
"provided_name": "country",
"creation_date": "1680097893316",
"analysis": {
"analyzer": {
"default": {
"filter": [
"lowercase"
],
"type": "custom",
"tokenizer": "partial_tokenizer"
}
},
"tokenizer": {
"partial_tokenizer": {
"token_chars": [
"letter",
"digit",
"punctuation",
"symbol",
"whitespace"
],
"min_gram": "2",
"type": "nGram",
"max_gram": "5"
}
}
},
"number_of_replicas": "0",
"uuid": "Dw9FF6VpR1yejS4ireZzXA",
"version": {
"created": "136227827"
}
}
}
}
} What are your OpenSearch version, python version and |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
johnsonjackc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You did it the right way, it does work on my end using your exact settings on the test project: