Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[raw/kitsune] Include mapping for data.metadata.value too big #1136

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion grimoire_elk/raw/kitsune.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,44 @@
#

from .elastic import ElasticOcean
from grimoire_elk.elastic_mapping import Mapping as BaseMapping


class Mapping(BaseMapping):

@staticmethod
def get_elastic_mappings(es_major):
"""Get Elasticsearch mapping.

:param es_major: major version of Elasticsearch, as string
:returns: dictionary with a key, 'items', with the mapping
"""

mapping = '''
{
"dynamic":true,
"properties": {
"data": {
"properties": {
"metadata": {
"dynamic":false,
"properties": {
"value": {
"type": "text",
"index": true
}
}
}
}
}
}
}
'''

return {"items": mapping}


class KitsuneOcean(ElasticOcean):
"""Kitsune Ocean feeder"""

pass
mapping = Mapping
9 changes: 9 additions & 0 deletions releases/unreleased/kitsune-raw-mapping-updated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Kitsune raw mapping updated
category: added
author: Jose Javier Merchante <[email protected]>
issue: null
notes: >
Update the mapping for Kitsune backend to fix an error
inserting Perceval items in the raw index when the field
'data.metadata.value' is too big.
Loading