Skip to content

Commit

Permalink
avoid extra fields mapped in elastic (superdesk#2164)
Browse files Browse the repository at this point in the history
trying to explicitly avoid those fields,
they still get auto created.
  • Loading branch information
petrjasek authored Dec 19, 2024
1 parent a26947d commit cebd5db
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion server/planning/events/events_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,20 @@
"accreditation_deadline": {"type": "datetime"},
# Reference can be used to hold for example a court case reference number
"reference": {"type": "string"},
"anpa_category": metadata_schema["anpa_category"],
"anpa_category": {
"type": "list",
"nullable": True,
"mapping": {
"type": "object",
"dynamic": False,
"properties": {
"qcode": not_analyzed,
"name": not_analyzed,
"scheme": not_analyzed,
"translations": {"enabled": False}, # explicitly disable
},
},
},
"files": {
"type": "list",
"nullable": True,
Expand Down Expand Up @@ -209,6 +222,7 @@
"address": {"type": "object", "dynamic": True},
"geo": {"type": "string"},
"location": {"type": "geo_point"},
"translations": {"enabled": False}, # explicitly disable
},
},
"nullable": True,
Expand Down Expand Up @@ -268,6 +282,7 @@
"properties": {
"qcode": not_analyzed,
"name": not_analyzed,
"translations": {"enabled": False}, # explicitly disable
},
},
},
Expand Down

0 comments on commit cebd5db

Please sign in to comment.