Skip to content

Commit

Permalink
Merge branch 'kitsune-mapping' of 'https://github.com/jjmerchante/gri…
Browse files Browse the repository at this point in the history
…moirelab-elk'

Merges #1136
Closes #1136
  • Loading branch information
sduenas authored Feb 26, 2024
2 parents 4131795 + 0f4e848 commit 03472e1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
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 <jjmerchante@bitergia.com>
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.

0 comments on commit 03472e1

Please sign in to comment.