Skip to content

Commit

Permalink
Disbale dynamic field mapping in ES indices.
Browse files Browse the repository at this point in the history
  • Loading branch information
markus1978 committed Jun 1, 2022
1 parent 6842238 commit 0fb97d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions optimade/server/entry_collections/elastic_indexes.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"references": {
"mappings": {
"doc": {
"dynamic" : false,
"properties": {
"address": {
"type": "keyword"
Expand Down Expand Up @@ -116,6 +117,7 @@
"structures": {
"mappings": {
"doc": {
"dynamic" : false,
"properties": {
"chemical_formula_anonymous": {
"type": "keyword"
Expand Down
1 change: 1 addition & 0 deletions optimade/server/entry_collections/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def create_elastic_index_from_mapper(
return {
"mappings": {
"doc": {
"dynamic": False,
"properties": {
resource_mapper.get_optimade_field(field): {"type": "keyword"}
for field in fields
Expand Down

0 comments on commit 0fb97d4

Please sign in to comment.