Skip to content
Snippets Groups Projects
Commit 828ca451 authored by Alessandro Cerioni's avatar Alessandro Cerioni
Browse files

Mapping the uuid field as keyword, which allows one to remove a dataset from...

Mapping the uuid field as keyword, which allows one to remove a dataset from the ingest index (cf. https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html)
parent 240141e7
Branches
Tags
No related merge requests found
......@@ -74,13 +74,35 @@ def index_docs(channel, method, properties, body, es):
#print(docs_to_index)
es_index = decoded_body['header']['index']['_index']
es_body = { "settings" : {"number_of_shards" : 1,
"number_of_replicas" : 0,
"index.mapping.total_fields.limit": 10000,
"refresh_interval": "30s"
},
"mappings": {"_doc": {"enabled": False}}
}
es_body = { "settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0,
"index.mapping.total_fields.limit": 10000,
"refresh_interval": "30s"
},
"mappings": {
"_doc": {
"dynamic_templates": [ # priority is given by order!
{
"uuid" : {
"path_match": "uuid",
"mapping": {
"type": "keyword",
}
}
},
{
"default" : {
"path_match": "*",
"mapping": {
"index": "false"
}
}
}
]
}
}
}
#es_body.update({"mappings": {"_doc": {"dynamic_date_formats": ["strict_date_optional_time"]}}})
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment