Skip to content

Instantly share code, notes, and snippets.

@Bklara
Created July 7, 2017 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bklara/c3d7909968598364336f5f5172e471dd to your computer and use it in GitHub Desktop.
Save Bklara/c3d7909968598364336f5f5172e471dd to your computer and use it in GitHub Desktop.
mapping_4testcrossfield
mapping:
{
"products_v22": {
"mappings": {
"nms": {
"properties": {
"brand": {
"properties": {
"country": {
"type": "text",
"copy_to": [
"search_string"
],
"analyzer": "ru_hunspell"
},
"directionId": {
"type": "integer"
},
"directionName": {
"type": "text",
"analyzer": "ru_hunspell"
},
"directionPics": {
"type": "double"
},
"id": {
"type": "integer"
},
"name": {
"type": "text",
"copy_to": [
"brand.value",
"brand.string",
"search_string"
],
"analyzer": "ru_hunspell"
},
"string": {
"type": "text",
"fields": {
"hyphen_search": {
"type": "text",
"analyzer": "stand_syn",
"search_analyzer": "hyphen_analyzer"
}
},
"analyzer": "hyphen_analyzer"
},
"value": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
},
"analyzer": "ru_hunspell"
}
}
},
"goodsName": {
"type": "text",
"copy_to": [
"search_string"
],
"analyzer": "ru_hunspell"
},
"groups": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "text"
},
"value": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
},
"copy_to": [
"search_string"
]
}
}
},
"subject": {
"properties": {
"id": {
"type": "integer"
},
"value": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
},
"copy_to": [
"search_string"
],
"analyzer": "ru_hunspell"
}
}
}
}
}
},
"settings": {
"index": {
"analysis": {
"filter": {
"split_on_numerics": {
"split_on_numerics": "true",
"split_on_case_change": "true",
"generate_word_parts": "true",
"type": "word_delimiter",
"generate_number_parts": "true"
},
"autocompleteFilter": {
"max_shingle_size": "5",
"min_shingle_size": "2",
"type": "shingle"
},
"ru_RU": {
"ignore_case": "true",
"locale": "ru_RU",
"type": "hunspell",
"dedup": "true"
},
"synonym": {
"type": "synonym",
"synonyms_path": "analysis/synonims.txt",
"expand": "false"
},
"synonym_lite": {
"type": "synonym",
"synonyms_path": "analysis/synonims_lite.txt"
},
"ru_stopwords": {
"type": "stop",
"stopwords": [
"более",
"бы",
"был",
"была",
"были",
"было",
"быть",
"в",
"вам",
"вас",
"весь",
"вся",
"во",
"вот",
"все",
"всего",
"всех",
"вы",
"где",
"да",
"даже",
"для",
"до",
"его",
"ее",
"если",
"есть",
"еще",
"же",
"за",
"здесь",
"и",
"из",
"или",
"им",
"их",
"к",
"как",
"ко",
"когда",
"кто",
"ли",
"либо",
"мне",
"может",
"мы",
"на",
"надо",
"наш",
"не",
"него",
"нее",
"нет",
"ни",
"них",
"но",
"ну",
"о",
"об",
"однако",
"он",
"она",
"они",
"оно",
"от",
"очень",
"по",
"под",
"при",
"с",
"со",
"так",
"также",
"такой",
"там",
"те",
"тем",
"то",
"того",
"тоже",
"той",
"только",
"том",
"ты",
"у",
"уже",
"хотя",
"чего",
"чей",
"чем",
"что",
"чтобы",
"чье",
"чья",
"эта",
"эти",
"это",
"я",
"при",
"a",
"an",
"and",
"are",
"as",
"at",
"be",
"but",
"by",
"for",
"if",
"in",
"into",
"is",
"it",
"no",
"not",
"of",
"on",
"or",
"such",
"that",
"the",
"their",
"then",
"there",
"these",
"they",
"this",
"to",
"was",
"will",
"with",
"другой",
"артикул",
"а",
"да",
"более",
"менее",
"самый",
"лучший",
"красивый",
"состав",
"рублей",
"фирмы",
"купить",
"недорогой",
"бренд",
"isbn"
]
},
"ru_stemming": {
"type": "snowball",
"language": "Russian"
},
"protwords": {
"type": "keyword_marker",
"keywords_path": "analysis/protwords.txt"
}
},
"char_filter": {
"russian_mapping": {
"type": "mapping",
"mappings": [
"ё=>е"
]
},
"without_minuses": {
"type": "mapping",
"mappings": [
"-=>"
]
},
"replace_dash_char_filter": {
"type": "mapping",
"mappings": [
"- => _",
"ё=>е"
]
}
},
"analyzer": {
"synonym": {
"filter": [
"lowercase",
"asciifolding",
"protwords",
"ru_stopwords",
"russian_morphology",
"synonym"
],
"char_filter": [
"russian_mapping"
],
"type": "custom",
"tokenizer": "whitespace"
},
"ru": {
"filter": [
"lowercase",
"ru_stopwords",
"protwords",
"russian_morphology",
"english_morphology"
],
"char_filter": [
"russian_mapping"
],
"type": "custom",
"tokenizer": "standard"
},
"synonym_2": {
"filter": [
"lowercase",
"asciifolding",
"ru_stopwords",
"synonym_lite"
],
"char_filter": [
"russian_mapping"
],
"type": "custom",
"tokenizer": "whitespace"
},
"autocomplete": {
"filter": [
"lowercase",
"asciifolding",
"autocompleteFilter"
],
"char_filter": [
"russian_mapping"
],
"type": "custom",
"tokenizer": "standard"
},
"hyphen_analyzer": {
"filter": [
"lowercase",
"asciifolding",
"synonym_lite"
],
"char_filter": [
"replace_dash_char_filter"
],
"tokenizer": "standard"
},
"whitespace_analyzer": {
"filter": [
"lowercase",
"asciifolding"
],
"char_filter": [
"russian_mapping"
],
"type": "custom",
"tokenizer": "whitespace"
},
"stand_syn": {
"filter": [
"lowercase",
"asciifolding",
"synonym"
],
"char_filter": [
"russian_mapping"
],
"tokenizer": "standard"
},
"for_isbn": {
"filter": [
"lowercase",
"ru_stopwords"
],
"char_filter": [
"without_minuses"
],
"type": "custom",
"tokenizer": "standard"
},
"ru_hunspell": {
"filter": [
"lowercase",
"protwords",
"ru_stopwords",
"ru_RU",
"split_on_numerics",
"synonym"
],
"char_filter": [
"russian_mapping"
],
"type": "custom",
"tokenizer": "standard"
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment