Hi !
I'm new on elasticsearch indexing.
And i'm trying to migrate from v5 to v8, i know this is a big change and challenge.
I read about types are deprecated now.
So , how could i manage my data ?
Now I have 1 index per website, and each index has different types of information, for example:
multimedia,
people,
publications,
resources.
In v5 we have organized in types.
How could I manage it now ?
I used php, latest elasticsearch composer library, and custom php code to create map, index, etc
config:
{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"index.mapping.total_fields.limit": 100000,
"analysis": {
"filter": {
"partial_filter": {
"type": "edge_ngram",
"min_gram": 2,
"max_gram": 20,
"token_chars": [
"letter",
"digit"
]
}
},
"analyzer": {
"partial-match": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"asciifolding",
"partial_filter"
]
},
"exact-match": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"asciifolding"
]
},
"last-name": {
"type": "custom",
"tokenizer": "keyword",
"filter": [
"lowercase",
"asciifolding"
]
}
}
}
},
"mappings": {
"_default_": {
"_all": {
"enabled": true,
"type": "string",
"analyzer": "partial-match",
"search_analyzer": "standard"
},
"dynamic_templates": [{
"string_template": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type": "string",
"analyzer": "partial-match",
"search_analyzer": "standard",
"fields": {
"{name}": {
"type": "text",
"index": "analyzed",
"analyzer": "partial-match",
"search_analyzer": "standard"
},
"exact-match": {
"type": "string",
"index": "analyzed",
"analyzer": "exact-match",
"search_analyzer": "exact-match"
}
}
}
}
}],
"properties": {
"post_title": {
"type": "text",
"analyzer": "partial-match",
"search_analyzer": "standard",
"fields": {
"sort-order": {
"type": "string",
"fielddata": true,
"index": "analyzed",
"analyzer": "last-name",
"search_analyzer": "last-name"
}
}
},
"date": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"orderby_date": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"post_status": {
"type": "string",
"index": "not_analyzed"
},
"visible": {
"type": "boolean",
"index": "not_analyzed"
},
"people": {
"type": "nested",
"properties": {
"id": {
"type": "integer",
"index": "not_analyzed"
},
"post_title": {
"type": "string",
"index": "not_analyzed"
}
}
},
"parent_blog": {
"type": "nested",
"properties": {
"id": {
"type": "integer",
"index": "not_analyzed"
}
}
}
}
},
"person": {
"properties": {
"last_name": {
"type": "text",
"analyzer": "partial-match",
"search_analyzer": "standard",
"fields": {
"raw": {
"type": "string",
"index": "not_analyzed"
},
"sort-order": {
"type": "string",
"fielddata": true,
"index": "analyzed",
"analyzer": "last-name",
"search_analyzer": "last-name"
},
"exact-match": {
"type": "string",
"index": "analyzed",
"analyzer": "exact-match",
"search_analyzer": "exact-match"
}
}
},
"first_name": {
"type": "text",
"analyzer": "partial-match",
"search_analyzer": "standard",
"fields": {
"raw": {
"type": "string",
"index": "not_analyzed"
},
"sort-order": {
"type": "string",
"fielddata": true,
"index": "analyzed",
"analyzer": "last-name",
"search_analyzer": "last-name"
},
"exact-match": {
"type": "string",
"index": "analyzed",
"analyzer": "exact-match",
"search_analyzer": "exact-match"
}
}
}
}
}
}
}