Commit 0641f370 authored by Carina Antunes's avatar Carina Antunes
Browse files

[SEARCH-60] Add egroups archives schemas

parent a16e6e44
......@@ -4,5 +4,6 @@
# This file is part of CERN Search.
# Copyright (C) 2018-2019 CERN.
#
# CERN Search is free software; you can redistribute it and/or modify it
# Citadel Search is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Init file."""
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of CERN Search.
# Copyright (C) 2018-2019 CERN.
#
# Citadel Search is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Init file."""
{
"title": "Archive schema v1.0.0",
"id": "http://<host:port>/schemas/egroupsarchives/archive_v1.0.0.json",
"$schema": "http://<host:port>/schemas/egroupsarchives/archive_v1.0.0.json",
"type": "object",
"properties": {
"_access": {
"type": "object",
"properties": {
"owner": {
"type": "array",
"items": {
"type": "string"
}
},
"read": {
"type": "array",
"items": {
"type": "string"
}
},
"update": {
"type": "array",
"items": {
"type": "string"
}
},
"delete": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"_data": {
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "Mail header from."
},
"subject": {
"type": "string",
"description": "Mail header subject."
},
"attachments": {
"type": "array",
"items": {
"type": "string"
},
"description": "Mail attachments filenames."
},
"body": {
"type": "string",
"description": "Mail body."
}
}
},
"date": {
"type": "string",
"description": "Mail header date."
},
"group": {
"type": "string",
"description": "Group name."
},
"control_number": {
"type": "string"
},
"$schema": {
"type": "string"
}
}
}
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of CERN Search.
# Copyright (C) 2018-2019 CERN.
#
# Citadel Search is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Init file."""
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of CERN Search.
# Copyright (C) 2018-2019 CERN.
#
# Citadel Search is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Init file."""
{
"settings": {
"index.percolator.map_unmapped_fields_as_string": true,
"index.mapping.total_fields.limit": 100
},
"mappings": {
"archive_v0.0.1": {
"dynamic": "strict",
"numeric_detection": true,
"properties": {
"_access": {
"type": "object",
"properties": {
"owner": {
"type": "keyword"
},
"read": {
"type": "keyword"
},
"update": {
"type": "keyword"
},
"delete": {
"type": "keyword"
}
}
},
"_data": {
"type": "object",
"properties": {
"body": {
"type": "text",
"fields": {
"english": {
"type": "text",
"analyzer": "english"
},
"french": {
"type": "text",
"analyzer": "french"
}
}
},
"from": {
"type": "keyword"
},
"attachments": {
"type": "keyword"
},
"subject": {
"type": "text",
"fields": {
"english": {
"type": "text",
"analyzer": "english"
},
"french": {
"type": "text",
"analyzer": "french"
}
}
}
}
},
"group": {
"type": "keyword",
"enabled": false
},
"date": {
"type": "date",
"format": "dd-MM-yyyy HH:mm"
},
"control_number": {
"type": "keyword"
},
"$schema": {
"enabled": false
}
}
}
}
}
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of CERN Search.
# Copyright (C) 2018-2019 CERN.
#
# Citadel Search is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Init file."""
{
"settings": {
"index.percolator.map_unmapped_fields_as_string": true,
"index.mapping.total_fields.limit": 100
},
"mappings": {
"dynamic": "strict",
"numeric_detection": true,
"properties": {
"_access": {
"type": "object",
"properties": {
"owner": {
"type": "keyword"
},
"read": {
"type": "keyword"
},
"update": {
"type": "keyword"
},
"delete": {
"type": "keyword"
}
}
},
"_data": {
"type": "object",
"properties": {
"body": {
"type": "text",
"fields": {
"english": {
"type": "text",
"analyzer": "english"
},
"french": {
"type": "text",
"analyzer": "french"
}
}
},
"from": {
"type": "keyword"
},
"attachments": {
"type": "keyword"
},
"subject": {
"type": "text",
"fields": {
"english": {
"type": "text",
"analyzer": "english"
},
"french": {
"type": "text",
"analyzer": "french"
}
}
}
}
},
"group": {
"type": "keyword",
"enabled": false
},
"date": {
"type": "date",
"format": "dd-MM-yyyy HH:mm"
},
"control_number": {
"type": "keyword"
},
"$schema": {
"enabled": false
}
}
}
}
......@@ -53,13 +53,15 @@ setup(
'test = cern_search_rest_api.modules.cernsearch.mappings.test',
'cernsearch-indico = cern_search_rest_api.modules.cernsearch.mappings.indico',
'webservices = cern_search_rest_api.modules.cernsearch.mappings.webservices',
'edms = cern_search_rest_api.modules.cernsearch.mappings.edms'
'edms = cern_search_rest_api.modules.cernsearch.mappings.edms',
'egroupsarchives = cern_search_rest_api.modules.cernsearch.mappings.egroupsarchives'
],
'invenio_jsonschemas.schemas': [
'test = cern_search_rest_api.modules.cernsearch.jsonschemas.test',
'cernsearch-indico = cern_search_rest_api.modules.cernsearch.jsonschemas.indico',
'webservices = cern_search_rest_api.modules.cernsearch.jsonschemas.webservices',
'edms = cern_search_rest_api.modules.cernsearch.jsonschemas.edms'
'edms = cern_search_rest_api.modules.cernsearch.jsonschemas.edms',
'egroupsarchives = cern_search_rest_api.modules.cernsearch.jsonschemas.egroupsarchives'
],
'invenio_base.apps': [
'cern-search = cern_search_rest_api.modules.cernsearch.ext:CERNSearch'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment