Commit 2a12971d authored by Carina Antunes's avatar Carina Antunes
Browse files

[SEARCH-92] Add codimd schemas

parent 2ee097ab
CERN_SEARCH_INSTANCE=codimd
INVENIO_INDEXER_DEFAULT_DOC_TYPE=notes_v1.0.0
INVENIO_INDEXER_DEFAULT_INDEX=codimd-notes_v1.0.0
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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
# under the terms of the MIT License; see LICENSE file for more details.
"""Init file."""
{
"title": "CodiMD Notes schema v1.0.0",
"id": "http://<host:port>/schemas/codimd/notes_v1.0.0.json",
"$schema": "http://<host:port>/schemas/codimd/notes_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": {
"owner": {
"type": "string",
"description": "Note owner."
},
"title": {
"type": "string",
"description": "Note title."
},
"body": {
"type": "string",
"description": "Note body."
}
}
},
"noteid": {
"type": "string",
"description": "Note Id."
},
"date": {
"type": "string",
"description": "Note creation date."
},
"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_text": true,
"index.mapping.total_fields.limit": 100,
"index.query.default_field": [
"_data.*"
]
},
"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": {
"owner": {
"type": "text",
"boost": 1.1,
"fields": {
"exact_match": {
"type": "keyword",
"boost": 1.1
}
}
},
"title": {
"type": "text",
"boost": 1.1
},
"body": {
"type": "text"
}
}
},
"noteid": {
"type": "keyword"
},
"date": {
"type": "date",
"format": "dd-MM-yyyy HH:mm"
},
"$schema": {
"enabled": false
},
"control_number": {
"type": "keyword"
},
"_created": {
"type": "date"
},
"_updated": {
"type": "date"
}
}
}
}
......@@ -57,14 +57,16 @@ setup(
'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',
'egroupsarchives = cern_search_rest_api.modules.cernsearch.mappings.egroupsarchives'
'egroupsarchives = cern_search_rest_api.modules.cernsearch.mappings.egroupsarchives',
'codimd = cern_search_rest_api.modules.cernsearch.mappings.codimd'
],
'invenio_jsonschemas.schemas': [
'test = cern_search_rest_api.modules.cernsearch.jsonschemas.test',
'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',
'egroupsarchives = cern_search_rest_api.modules.cernsearch.jsonschemas.egroupsarchives'
'egroupsarchives = cern_search_rest_api.modules.cernsearch.jsonschemas.egroupsarchives',
'codimd = cern_search_rest_api.modules.cernsearch.jsonschemas.codimd'
],
'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