Skip to content

Commit

Permalink
mappings: add support for ES5 and ES6
Browse files Browse the repository at this point in the history
  • Loading branch information
frankois authored and slint committed Aug 12, 2019
1 parent acec28a commit 6d59e56
Show file tree
Hide file tree
Showing 6 changed files with 340 additions and 0 deletions.
9 changes: 9 additions & 0 deletions invenio_openaire/mappings/v5/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2019 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

"""Mappings for ES 5."""
55 changes: 55 additions & 0 deletions invenio_openaire/mappings/v5/funders/funder-v1.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"mappings": {
"funder-v1.0.0": {
"date_detection": false,
"numeric_detection": false,
"properties": {
"doi": {
"type": "keyword"
},
"identifiers": {
"type": "object",
"properties": {
"oaf": {
"type": "keyword"
}
}
},
"name": {
"type": "text"
},
"acronyms": {
"type": "text"
},
"country": {
"type": "keyword"
},
"type": {
"type": "keyword"
},
"subtype": {
"type": "keyword"
},
"remote_created": {
"type": "date"
},
"remote_modified": {
"type": "date"
},
"parent": {
"type": "object",
"properties": {
"$ref": {
"type": "keyword"
}
}
},
"suggest": {
"type": "completion",
"analyzer" : "snowball",
"search_analyzer" : "snowball"
}
}
}
}
}
106 changes: 106 additions & 0 deletions invenio_openaire/mappings/v5/grants/grant-v1.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"mappings": {
"grant-v1.0.0": {
"date_detection": false,
"numeric_detection": false,
"properties": {
"$schema": {
"type": "keyword"
},
"internal_id": {
"type": "keyword"
},
"code": {
"type": "keyword"
},
"title": {
"type": "text"
},
"acronym": {
"type": "text"
},
"startdate": {
"type": "date",
"ignore_malformed": true
},
"enddate": {
"type": "date",
"ignore_malformed": true
},
"funder": {
"type": "object",
"properties": {
"doi": {
"type": "keyword"
},
"identifiers": {
"type": "object",
"properties": {
"oaf": {
"type": "keyword"
}
}
},
"name": {
"type": "text"
},
"acronyms": {
"type": "text"
},
"country": {
"type": "keyword"
},
"type": {
"type": "keyword"
},
"subtype": {
"type": "keyword"
},
"remote_created": {
"type": "date"
},
"remote_modified": {
"type": "date"
}
}
},
"program": {
"type": "text"
},
"remote_modified": {
"type": "date",
"ignore_malformed": true
},
"url": {
"type": "text"
},
"identifiers": {
"type": "object",
"properties": {
"oai_id": {
"type": "keyword"
},
"purl": {
"type": "keyword"
},
"eurepo": {
"type": "keyword"
}
}
},
"suggest": {
"type": "completion",
"analyzer": "snowball",
"search_analyzer": "snowball",
"contexts": [
{
"name": "funder",
"type": "category",
"path": "funder.doi"
}
]
}
}
}
}
}
9 changes: 9 additions & 0 deletions invenio_openaire/mappings/v6/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2019 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

"""Mappings for ES 6."""
55 changes: 55 additions & 0 deletions invenio_openaire/mappings/v6/funders/funder-v1.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"mappings": {
"funder-v1.0.0": {
"date_detection": false,
"numeric_detection": false,
"properties": {
"doi": {
"type": "keyword"
},
"identifiers": {
"type": "object",
"properties": {
"oaf": {
"type": "keyword"
}
}
},
"name": {
"type": "text"
},
"acronyms": {
"type": "text"
},
"country": {
"type": "keyword"
},
"type": {
"type": "keyword"
},
"subtype": {
"type": "keyword"
},
"remote_created": {
"type": "date"
},
"remote_modified": {
"type": "date"
},
"parent": {
"type": "object",
"properties": {
"$ref": {
"type": "keyword"
}
}
},
"suggest": {
"type": "completion",
"analyzer": "snowball",
"search_analyzer": "snowball"
}
}
}
}
}
106 changes: 106 additions & 0 deletions invenio_openaire/mappings/v6/grants/grant-v1.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"mappings": {
"grant-v1.0.0": {
"date_detection": false,
"numeric_detection": false,
"properties": {
"$schema": {
"type": "keyword"
},
"internal_id": {
"type": "keyword"
},
"code": {
"type": "keyword"
},
"title": {
"type": "text"
},
"acronym": {
"type": "text"
},
"startdate": {
"type": "date",
"ignore_malformed": true
},
"enddate": {
"type": "date",
"ignore_malformed": true
},
"funder": {
"type": "object",
"properties": {
"doi": {
"type": "keyword"
},
"identifiers": {
"type": "object",
"properties": {
"oaf": {
"type": "keyword"
}
}
},
"name": {
"type": "text"
},
"acronyms": {
"type": "text"
},
"country": {
"type": "keyword"
},
"type": {
"type": "keyword"
},
"subtype": {
"type": "keyword"
},
"remote_created": {
"type": "date"
},
"remote_modified": {
"type": "date"
}
}
},
"program": {
"type": "text"
},
"remote_modified": {
"type": "date",
"ignore_malformed": true
},
"url": {
"type": "text"
},
"identifiers": {
"type": "object",
"properties": {
"oai_id": {
"type": "keyword"
},
"purl": {
"type": "keyword"
},
"eurepo": {
"type": "keyword"
}
}
},
"suggest": {
"type": "completion",
"analyzer": "snowball",
"search_analyzer": "snowball",
"contexts": [
{
"name": "funder",
"type": "category",
"path": "funder.doi"
}
]
}
}
}
}
}

0 comments on commit 6d59e56

Please sign in to comment.