Skip to content

Commit

Permalink
Default: do not index "properties" fields which may be indexing bombs
Browse files Browse the repository at this point in the history
martin-village committed Aug 12, 2024

Verified

This commit was signed with the committer’s verified signature.
sourabhxyz Sourabh
1 parent 9c728c6 commit 59b02d8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions target_elasticsearch/sinks.py
Original file line number Diff line number Diff line change
@@ -283,6 +283,16 @@ def create_indices(self, indices: Set[str]) -> None:
}
},
],
# Some properties may be problematic - it's the case for fields called "properties",
# which usually cause more problems than it solves -> disable dynamic mapping, and
# store the field without indexing the contents
"properties": {
"properties": {
"type": "object",
"dynamic": "false",
"enabled": False
}
}
}


0 comments on commit 59b02d8

Please sign in to comment.