way to see the analyzer used and applied on the index is by setting the setting of an index
GET /khanscript2/_settings
{
"khanscript2": {
"settings": {
"index": {
"number_of_shards": "5",
"provided_name": "khanscript2",
"creation_date": "1544413347896",
"analysis": {
"filter": {
"english_stop": {
"type": "stop",
"stopwords": "_english_"
},
"light_english_stemmer": {
"type": "stemmer",
"language": "light_english"
},
"english_possessive_stemmer": {
"type": "stemmer",
"language": "possessive_english"
}
},
"analyzer": {
"english2": {
"filter": [
"english_possessive_stemmer",
"lowercase",
"english_stop",
"light_english_stemmer",
"asciifolding"
],
"tokenizer": "standard"
}
}
},
"number_of_replicas": "1",
"uuid": "TO5mkCfwTre8ZX-XKcUPbA",
"version": {
"created": "6040199"
}
}
}
}
}
example of creating mapping
PUT test
{
"settings":{
"analysis": {
"filter": {
"english_stop": {
"type": "stop",
"stopwords": "_english_"
},
"english_possessive_stemmer": {
"type": "stemmer",
"language": "possessive_english"
},
"light_english_stemmer": {
"type": "stemmer",
"language": "light_english"
}
},
"analyzer": {
"english2": {
"filter": [
"english_possessive_stemmer",
"lowercase",
"english_stop",
"light_english_stemmer",
"asciifolding"
],
"tokenizer": "standard"
}
}
}
},
"mappings":{
"_doc":{
"properties":{
"title": {
"type":"text",
"analyzer":"english2"
},
"script": {
"type":"text",
"analyzer":"english2"
}
}
}
}
}
GET /khanscript2/_settings
{
"khanscript2": {
"settings": {
"index": {
"number_of_shards": "5",
"provided_name": "khanscript2",
"creation_date": "1544413347896",
"analysis": {
"filter": {
"english_stop": {
"type": "stop",
"stopwords": "_english_"
},
"light_english_stemmer": {
"type": "stemmer",
"language": "light_english"
},
"english_possessive_stemmer": {
"type": "stemmer",
"language": "possessive_english"
}
},
"analyzer": {
"english2": {
"filter": [
"english_possessive_stemmer",
"lowercase",
"english_stop",
"light_english_stemmer",
"asciifolding"
],
"tokenizer": "standard"
}
}
},
"number_of_replicas": "1",
"uuid": "TO5mkCfwTre8ZX-XKcUPbA",
"version": {
"created": "6040199"
}
}
}
}
}
example of creating mapping
PUT test
{
"settings":{
"analysis": {
"filter": {
"english_stop": {
"type": "stop",
"stopwords": "_english_"
},
"english_possessive_stemmer": {
"type": "stemmer",
"language": "possessive_english"
},
"light_english_stemmer": {
"type": "stemmer",
"language": "light_english"
}
},
"analyzer": {
"english2": {
"filter": [
"english_possessive_stemmer",
"lowercase",
"english_stop",
"light_english_stemmer",
"asciifolding"
],
"tokenizer": "standard"
}
}
}
},
"mappings":{
"_doc":{
"properties":{
"title": {
"type":"text",
"analyzer":"english2"
},
"script": {
"type":"text",
"analyzer":"english2"
}
}
}
}
}
Comments
Post a Comment