diff --git a/backend/addcorpus/corpus.py b/backend/addcorpus/corpus.py index e1e6f59bb..b11f279bd 100644 --- a/backend/addcorpus/corpus.py +++ b/backend/addcorpus/corpus.py @@ -712,6 +712,7 @@ def __init__(self, visualizations=[], visualization_sort=None, es_mapping={'type': 'text'}, + language=None, search_filter=None, extractor=extract.Constant(None), sortable=None, @@ -735,6 +736,7 @@ def __init__(self, self.visualizations = visualizations self.visualization_sort = visualization_sort self.es_mapping = es_mapping + self.language = language self.indexed = indexed self.hidden = not indexed or hidden self.extractor = extractor diff --git a/backend/corpora/peaceportal/peaceportal.py b/backend/corpora/peaceportal/peaceportal.py index f4217dc63..1f721d50b 100644 --- a/backend/corpora/peaceportal/peaceportal.py +++ b/backend/corpora/peaceportal/peaceportal.py @@ -154,36 +154,42 @@ def request_media(self, document): transcription_german = FieldDefinition( name='transcription_de', es_mapping=main_content_mapping(stopword_analysis=True, stemming_analysis=True, language='de'), + language='de', hidden=True ) transcription_english = FieldDefinition( name='transcription_en', es_mapping=main_content_mapping(stopword_analysis=True, stemming_analysis=True, language='en'), + language='en', hidden=True ) transcription_hebrew = FieldDefinition( name='transcription_he', # no stopwords / stemmers available es_mapping={'type': 'text'}, + language='he', hidden=True ) transcription_latin = FieldDefinition( name='transcription_la', es_mapping={'type': 'text'}, # no stopwords / stemmers available + language='la', hidden=True ) transcription_greek = FieldDefinition( name='transcription_el', es_mapping=main_content_mapping(stopword_analysis=True, stemming_analysis=True, language='el'), + language='el', hidden=True ) transcription_dutch = FieldDefinition( name='transcription_nl', es_mapping=main_content_mapping(stopword_analysis=True, stemming_analysis=True, language='nl'), + language='nl', hidden=True )