Commit 5847e5bb authored by Pablo Panero's avatar Pablo Panero
Browse files

Add: Indico Attachments JSONSchema, Mapping and documentation

parent d3abea1d
{
"title": "Indico Attachments schema v1.0.0",
"id": "http://localhost:5000/schemas/indico/attachments_v1.0.0.json",
"$schema": "http://localhost:5000/schemas/indico/attachments_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"
}
}
}
},
"id": {
"type": "string",
"description": "Attachments id."
},
"category_path": {
"type": "array",
"items": {
"type": "string"
},
"description": "Attachments category path (ordered array)."
},
"event_id": {
"type": "string",
"description": "Event id.",
"required": false
},
"contribution_id": {
"type": "string",
"description": "Contribution id.",
"required": false
},
"creation_date": {
"type": "string",
"description": "Attachments creation date."
},
"filename": {
"type": "string",
"description": "Attachments filename."
},
"content": {
"type": "string",
"description": "Attachments content."
},
"custom_pid": {
"type": "string"
},
"$schema": {
"type": "string"
}
}
}
\ No newline at end of file
......@@ -50,7 +50,7 @@
},
"contribution_id": {
"type": "string",
"description": "Event id."
"description": "Contribution id."
},
"creation_date": {
"type": "string",
......
{
"settings": {
"index.percolator.map_unmapped_fields_as_string": true,
"index.mapping.total_fields.limit": 30
},
"mappings": {
"attachments_v1.0.0": {
"numeric_detection": true,
"_meta": {
"_owner": "indico@cern.ch"
},
"properties": {
"_access": {
"type": "nested",
"properties": {
"owner":{
"type": "keyword"
},
"read": {
"type": "keyword"
},
"update": {
"type": "keyword"
},
"delete": {
"type": "keyword"
}
}
},
"id": {
"type": "keyword"
},
"category_path": {
"type": "keyword"
},
"event_id": {
"type": "keyword"
},
"contribution_id": {
"type": "keyword"
},
"subcontribution_id": {
"type": "keyword"
},
"creation_date": {
"type": "date",
"format": "YYYY-MM-DDZHH:MM"
},
"filename": {
"type": "text",
"fields": [
{
"english": {
"type": "text",
"analyzer": "english"
}
},
{
"french": {
"type": "text",
"analyzer": "french"
}
}
]
},
"content": {
"type": "text",
"fields": [
{
"english": {
"type": "text",
"analyzer": "english"
}
},
{
"french": {
"type": "text",
"analyzer": "french"
}
}
]
},
"custom_pid": {
"type": "keyword"
},
"$schema": {
"type": "keyword"
}
}
}
}
}
\ No newline at end of file
......@@ -65,7 +65,6 @@ The first version of the _Contributions_ mapping stores the information about an
Q: Category path is repeated, should it be?
Q: Event title will be removed to avoid the denormalization updates mentioned above.
Q: list_of_persons.role is an array or can only take one value?
### Subcontributions
......@@ -94,4 +93,25 @@ The first version of the _Subcontributions_ mapping stores the information about
- mapping path: '/cernsearch/mappings/v5/indico/subcontribution_v1.0.0.json'
Q: Event and contribution title will be removed to avoid the denormalization updates mentioned above.
Q: list_of_persons.role is an array or can only take one value?
\ No newline at end of file
### Attachments
--- v1.0.0 ---
The first version of the _Attachment_ mapping stores the information about an Indico attachment to an event/contribution/subcontribution.
* __\_access__: owner, read, update, delete rights base on an egroup list. Stored as a nested object, being each of the permissions of keyword type (exact match).
* __id__: ID of the attachment. Stored as keyword for exact match queries.
* __caterogy path__: Array containing the different path levels to which the attachment belongs to. Stored as keyword for exact match queries.
* __event_id__: ID of the event to which the attachment belongs to. Stored as keyword for exact match queries.
* __contribution_id__: ID of the contribution to which the attachment belongs to. Stored as keyword for exact match queries.
* __subcontribution_id__: ID of the subcontribution to which the attachment belongs to. Stored as keyword for exact match queries.
* __creation_date__: Creation date of the attachment. Stored as date with 'YYYY-MM-DDZHH:MM' format.
* __filename__: Filename of the attachment. Stored as text for full-text search. The ``title`` field is analyzed with the ``standard`` analyzer, ``title.english`` with the ``english`` one and the corresponding is done for ``title.french``. This three times analyzis helps improve query relevance.
* __content__: Content of the attachment. Stored as text for full-text search. The ``title`` field is analyzed with the ``standard`` analyzer, ``title.english`` with the ``english`` one and the corresponding is done for ``title.french``. This three times analysis helps improve query relevance.
- jsonschema path: '/cernsearch/jsonschemas/indico/attachment_v1.0.0.json'
- mapping path: '/cernsearch/mappings/v5/indico/attachment_v1.0.0.json'
Q: Event, contribution and subcontribution title will be removed to avoid the denormalization updates mentioned above. Should the IDs also for higher normalization, or do they not change at all? (if so, same applies to subcontributions).
\ No newline at end of file
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