Apologies for the length of the code, but I have an example of the settings and mappings for 5.3.
Using: PUT localhost:9200/asset_en_v1
{
"settings": {
"analysis": {
"char_filter": {
"&_to_and": {
"type": "mapping",
"mappings": ["&=> and "]
}
},
"filter": {
"asset_en_stopwords": {
"type": "stop",
"stopwords": ["_english_"]
},
"asset_en_stemmer": {
"type": "stemmer",
"name": "english"
},
"asset_en_shingle": {
"type": "shingle",
"max_shingle_size": 5,
"min_shingle_size": 2,
"output_unigrams": false,
"output_unigrams_if_no_shingles": true
}
},
"analyzer": {
"asset_en_analyzer": {
"type": "custom",
"char_filter": ["html_strip", "&_to_and"],
"tokenizer": "standard",
"filter": [ "asset_en_stopwords", "asset_en_stemmer", "lowercase", "asset_en_shingle", "asciifolding" ]
}
}
}
},
"mappings": {
"note": {
"_all": {
"enabled": false
},
"properties": {
"user_id": {
"type": "long"
},
"creation": {
"type": "date",
"format": "date_hour_minute_second"
},
"deleted": {
"type": "integer"
},
"favourite": {
"type": "integer"
},
"modification": {
"type": "date",
"format": "date_hour_minute_second"
},
"note": {
"type": "text",
"analyzer": "english",
"fields": {
"std": {
"type": "text",
"analyzer": "asset_en_analyzer",
"fields": {
"std": {
"type": "text",
"analyzer": "standard"
}
}
}
}
},
"title": {
"type": "text",
"analyzer": "english",
"fields": {
"std": {
"type": "text",
"analyzer": "asset_en_analyzer",
"fields": {
"std": {
"type": "text",
"analyzer": "standard"
}
}
}
}
},
"links_to_asset": {
"type": "nested",
"properties": {
"note_link_id": {
"type": "long"
},
"user_id": {
"type": "long"
},
"creation": {
"type": "date",
"format": "date_hour_minute_second"
},
"modification": {
"type": "date",
"format": "date_hour_minute_second"
},
"to_asset": {
"type": "integer"
},
"from_asset": {
"type": "integer"
},
"comment": {
"type": "text",
"fields": {
"std": {
"type": "text",
"analyzer": "asset_en_analyzer",
"fields": {
"std": {
"type": "text",
"analyzer": "standard"
}
}
}
}
}
}
}
}
},
"folder": {
"_all": {
"enabled": false
},
"properties": {
[ DUPLICATE PROPERTIES FOUND IN "NOTE" ],
"in_folder_id": {
"type": "long"
},
"label": {
"type": "integer"
}
}
},
"bookmark": {
"_all": {
"enabled": false
},
"properties": {
[ DUPLICATE PROPERTIES FOUND IN "NOTE" ],
"url": {
"type": "text",
"index": "not_analyzed"
},
"publication_date": {
"type": "date",
"format": "date_hour_minute_second"
}
}
},
"message": {
"_all": {
"enabled": false
},
"properties": {
[ DUPLICATE PROPERTIES FOUND IN "NOTE" ],
"from": {
"type": "text",
"index": "not_analyzed"
},
"seen": {
"type": "text",
"index": "not_analyzed"
}
}
}
}
}