Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Custom Settings not applied to an Index

Sanjay Jun 21, 2019 10:45AM +03

I am creating index based on below settings
{
"properties": {
"Level1": {
"type": "text",
"analyzer": "my_analyzer"
},
"Level2": {
"type": "text",
"analyzer": "my_analyzer"
},
"Level3": {
"type": "text",
"analyzer": "my_analyzer"
}
},
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "standard",
"filter": [
"lowercase",
"ngram"
]
}
},
"filter": {
"ngram": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 5,
"token_chars": [
"letter",
"digit"
]
}
}
}
}
}

not applied
{
"index1": {
"settings": {
"index": {
"mapping": {
"total_fields": {
"limit": "2000"
}
},
"refresh_interval": "5s",
"number_of_shards": "1",
"translog": {
"flush_threshold_size": "20mb",
"retention": {
"size": "20mb",
"age": "60s"
}
},
"provided_name": "index1",
"creation_date": "1561100494395",
"analysis": {
"filter": {
"edge_ngram": {
"type": "edgeNGram",
"min_gram": "3",
"max_gram": "10"
},
"ngram": {
"token_chars": [
"letter",
"digit"
],
"min_gram": "1",
"type": "edge_ngram",
"max_gram": "5"
}
},
"analyzer": {
"autocomplete": {
"filter": [
"edge_ngram"
],
"type": "custom",
"tokenizer": "lowercase"
},
"my_analyzer": {
"filter": [
"lowercase",
"ngram"
],
"tokenizer": "standard"
},
"ducet_sort": {
"filter": [
"icu_collation"
],
"tokenizer": "keyword"
}
}
},
"number_of_replicas": "1",
"uuid": "PbeMMW_hSXWEDGGhthI6vA",
"version": {
"created": "6020499"
}
}
}
}
}

Up 0 rated Down
Ferhat Sobay Jun 21, 2019 11:07AM +03 Searchly Agent
Hi Sanjay,

That outcome settings are applied when you create an index via dashboard.

Can you please delete the index and send your index settings to index create api via api ?

Best,
Ferhat
Up 0 rated Down
Sanjay Jun 21, 2019 11:30AM +03
Hello Ferhat,

Not getting an option on dashboard to apply any settings.


Below is the create api call params which am making .
Concern in my custom settings , analyzer are not being applied.
PUT http://site:{apikey}@xyz.searchly.com/myindex

{
"properties": {
"MasterLevel1": {
"type": "text",
"analyzer": "my_analyzer"
},
"MasterLevel2": {
"type": "text",
"analyzer": "my_analyzer"
},
"MasterLevel3": {
"type": "text",
"analyzer": "my_analyzer"
}
},
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "standard",
"filter": [
"lowercase",
"ngram"
]
}
},
"filter": {
"ngram": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 5,
"token_chars": [
"letter",
"digit"
]
}
}
}
}
}

Output of after applying Settings/ creating index
GET http://site:{apikey}@xyz.searchly.com/myindex/_settings
{
"myindex": {
"settings": {
"index": {
"mapping": {
"total_fields": {
"limit": "2000"
}
},
"refresh_interval": "5s",
"number_of_shards": "1",
"translog": {
"flush_threshold_size": "20mb",
"retention": {
"size": "20mb",
"age": "60s"
}
},
"provided_name": "myindex",
"creation_date": "1561105482743",
"analysis": {
"filter": {
"ngram": {
"token_chars": [
"letter",
"digit"
],
"min_gram": "1",
"type": "edge_ngram",
"max_gram": "5"
}
},
"analyzer": {
"my_analyzer": {
"filter": [
"lowercase",
"ngram"
],
"tokenizer": "standard"
}
}
},
"number_of_replicas": "1",
"uuid": "1FyzjzB6SRug-TnCBqyQow",
"version": {
"created": "6020499"
}
}
}
}
}

Could you please let me know...

Thanks,
Sanjay
Up 0 rated Down
Ferhat Sobay Jun 21, 2019 11:39AM +03 Searchly Agent
Hi Sanjay,

Can you please contact directly to support@searchly.com with space id so we can check it ?

Best,
Ferhat
Up 0 rated Down
Sanjay Jun 21, 2019 11:46AM +03
Ok , Ferhat.

Thanks.
Up 0 rated Down
Ferhat Sobay Jun 21, 2019 03:15PM +03 Searchly Agent
Fixed with adding mapping section as;

PUT myindex
{
"mappings": {
"mytype": {
"properties": {
"MasterLevel1": {
"type": "text",
"analyzer": "my_analyzer"
},
"MasterLevel2": {
"type": "text",
"analyzer": "my_analyzer"
},
"MasterLevel3": {
"type": "text",
"analyzer": "my_analyzer"
}
}
}
},
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "standard",
"filter": [
"lowercase",
"ngram"
]
}
},
"filter": {
"ngram": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 5,
"token_chars": [
"letter",
"digit"
]
}
}
}
}
}

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
http://assets0.desk.com/
false
searchboxio
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete