Skip to content

Instantly share code, notes, and snippets.

@andreierdoss
Created April 29, 2016 12:47
Show Gist options
  • Save andreierdoss/a601d20bd14207f9f6f314f47297d6a5 to your computer and use it in GitHub Desktop.
Save andreierdoss/a601d20bd14207f9f6f314f47297d6a5 to your computer and use it in GitHub Desktop.
{
"doc": {
"_all": {
"enabled": false
},
"_source": {
"enabled": true
},
"dynamic_templates": [
{
"lang_ar": {
"match": "*_ar",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_bg": {
"match": "*_bg",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_bn": {
"match": "*_bn",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_ca": {
"match": "*_ca",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_cs": {
"match": "*_cs",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_da": {
"match": "*_da",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_de": {
"match": "*_de",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_el": {
"match": "*_el",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_en": {
"match": "*_en",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_es": {
"match": "*_es",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_et": {
"match": "*_et",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_fa": {
"match": "*_fa",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_fi": {
"match": "*_fi",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_fr": {
"match": "*_fr",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_gu": {
"match": "*_gu",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_he": {
"match": "*_he",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_hi": {
"match": "*_hi",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_hr": {
"match": "*_hr",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_hu": {
"match": "*_hu",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_id": {
"match": "*_id",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_it": {
"match": "*_it",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_ja": {
"match": "*_ja",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_ko": {
"match": "*_ko",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_lt": {
"match": "*_lt",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_lv": {
"match": "*_lv",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_mk": {
"match": "*_mk",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_ml": {
"match": "*_ml",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_nl": {
"match": "*_nl",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_no": {
"match": "*_no",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_pa": {
"match": "*_pa",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_pl": {
"match": "*_pl",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_pt": {
"match": "*_pt",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_ro": {
"match": "*_ro",
"mapping": {
"type": "string",
"analyzer": "romanian_analyzer"
}
}
},
{
"lang_ru": {
"match": "*_ru",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_si": {
"match": "*_si",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_sq": {
"match": "*_sq",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_sv": {
"match": "*_sv",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_ta": {
"match": "*_ta",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_te": {
"match": "*_te",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_th": {
"match": "*_th",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_tl": {
"match": "*_tl",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_tr": {
"match": "*_tr",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_uk": {
"match": "*_uk",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_ur": {
"match": "*_ur",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_vi": {
"match": "*_vi",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_zh-cn": {
"match": "*_zh-cn",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
},
{
"lang_zh-tw": {
"match": "*_zh-tw",
"mapping": {
"type": "string",
"analyzer": "empty_analyzer"
}
}
}
],
"properties": {
"anchor": {
"type": "string",
"index": "not_analyzed"
},
"boost": {
"type": "float"
},
"click_count": {
"type": "long"
},
"config_id": {
"type": "string",
"index": "not_analyzed"
},
"content": {
"type": "langstring",
"lang_field": "lang",
"analyzer": "standard_analyzer",
"term_vector": "with_positions_offsets"
},
"content_length": {
"type": "long"
},
"created": {
"type": "date",
"format": "date_optional_time"
},
"timestamp": {
"type": "date",
"format": "date_optional_time"
},
"expires": {
"type": "date",
"format": "date_optional_time"
},
"digest": {
"type": "string"
},
"doc_id": {
"type": "string",
"index": "not_analyzed"
},
"favorite_count": {
"type": "long"
},
"filetype": {
"type": "string",
"index": "not_analyzed"
},
"host": {
"type": "string",
"index": "not_analyzed"
},
"lang": {
"type": "string",
"index": "not_analyzed"
},
"last_modified": {
"type": "date",
"format": "date_optional_time"
},
"mimetype": {
"type": "string",
"index": "not_analyzed"
},
"parent_id": {
"type": "string",
"index": "not_analyzed"
},
"role": {
"type": "string",
"index": "not_analyzed"
},
"label": {
"type": "string",
"index": "not_analyzed"
},
"segment": {
"type": "string",
"index": "not_analyzed"
},
"site": {
"type": "string",
"index": "not_analyzed"
},
"title": {
"type": "langstring",
"lang_field": "lang",
"analyzer": "standard_analyzer",
"term_vector": "with_positions_offsets"
},
"url": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
{
"settings": {
"index": {
"refresh_interval": "1s",
"number_of_shards": 5,
"number_of_replicas": 0
},
"analysis": {
"char_filter": {
"removeall_filter": {
"type": "pattern_replace",
"pattern":"(.*)",
"replacement":""
}
},
"filter": {
"stemmer_ro_filter": {
"type": "stemmer",
"name": "romanian"
},
"stopword_ro_filter": {
"type": "stop",
"stopwords": "_romanian_"
},
"truncate10_filter" : {
"type" : "truncate",
"length" : 10
},
"truncate20_filter" : {
"type" : "truncate",
"length" : 20
},
"alphanum_word_filter" : {
"type" : "alphanum_word",
"max_token_length" : 20
}
},
"tokenizer": {
"unigram_synonym_tokenizer": {
"type": "ngram_synonym",
"n": "1",
"synonyms_path": "${fess.dictionary.path}synonym.txt",
"dynamic_reload":true,
"reload_interval":"1m"
},
},
"analyzer": {
"romanian_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"truncate20_filter",
"lowercase",
]
},
"empty_analyzer": {
"type": "custom",
"tokenizer": "standard",
"char_filter": [
"removeall_filter"
]
},
"standard_analyzer": {
"type": "custom",
"tokenizer": "unigram_synonym_tokenizer",
"filter": [
"alphanum_word_filter",
"cjk_bigram",
"stopword_ro_filter",
"lowercase",
"stemmer_ro_filter"
]
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment