Commit d3abea1d authored by Pablo Panero's avatar Pablo Panero
Browse files

Add: Indico Subcontributions JSONSchema, Mapping and documentation

parent ed981ae6
{
"title": "Indico Subontributions schema v1.0.0",
"id": "http://localhost:5000/schemas/indico/subcontributions_v1.0.0.json",
"$schema": "http://localhost:5000/schemas/indico/subcontributions_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": "Subontributions id."
},
"category_path": {
"type": "array",
"items": {
"type": "string"
},
"description": "Subontributions category path (ordered array)."
},
"event_id": {
"type": "string",
"description": "Event id."
},
"contribution_id": {
"type": "string",
"description": "Event id."
},
"creation_date": {
"type": "string",
"description": "Subontributions creation date."
},
"start_date": {
"type": "string",
"description": "Subontributions start date."
},
"end_date": {
"type": "string",
"description": "Subontributions end date."
},
"location": {
"type": "string",
"description": "Subontributions location."
},
"title": {
"type": "string",
"description": "Subontributions title."
},
"description": {
"type": "string",
"description": "Subontributions description."
},
"list_of_persons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Subontributions person's name."
},
"affiliation": {
"type": "string",
"description": "Subontributions person's affiliation."
},
"role": {
"type": "array",
"items": {
"type": "string"
},
"description": "Subontributions person's role(s)."
}
}
}
},
"custom_pid": {
"type": "string"
},
"$schema": {
"type": "string"
}
}
}
\ No newline at end of file
{
"settings": {
"index.percolator.map_unmapped_fields_as_string": true,
"index.mapping.total_fields.limit": 30
},
"mappings": {
"subcontributions_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"
},
"creation_date": {
"type": "date",
"format": "YYYY-MM-DDZHH:MM"
},
"start_date": {
"type": "date",
"format": "YYYY-MM-DDZHH:MM"
},
"end_date": {
"type": "date",
"format": "YYYY-MM-DDZHH:MM"
},
"location": {
"type": "text"
},
"title": {
"type": "text",
"fields": [
{
"english": {
"type": "text",
"analyzer": "english"
}
},
{
"french": {
"type": "text",
"analyzer": "french"
}
}
]
},
"description": {
"type": "text",
"fields": [
{
"english": {
"type": "text",
"analyzer": "english"
}
},
{
"french": {
"type": "text",
"analyzer": "french"
}
}
]
},
"list_of_persons": {
"type": "nested",
"properties": {
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"affiliation": {
"type": "text"
},
"role": {
"type": "keyword"
}
}
},
"custom_pid": {
"type": "keyword"
},
"$schema": {
"type": "keyword"
}
}
}
}
}
\ No newline at end of file
......@@ -65,4 +65,33 @@ 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
--- v1.0.0 ---
The first version of the _Subcontributions_ mapping stores the information about an Indico subcontribution to an event.
* __\_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 subcontribution. Stored as keyword for exact match queries.
* __caterogy path__: Array containing the different path levels to which the subcontribution belongs to. Stored as keyword for exact match queries.
* __event_id__: ID of the event to which the subcontribution belongs to. Stored as keyword for exact match queries.
* __contribution_id__: ID of the contribution to which the subcontribution belongs to. Stored as keyword for exact match queries.
* __creation_date__: Creation date of the subcontribution. Stored as date with 'YYYY-MM-DDZHH:MM' format.
* __start_date__: Starting date of the subcontribution. Stored as date with 'YYYY-MM-DDZHH:MM' format.
* __end_date__: Ending date of the subcontribution. Stored as date with 'YYYY-MM-DDZHH:MM' format.
* __location__: Location/Place of the subcontribution. Stored as text for full-text search, only using ``standard`` analyzer.
* __title__: Title of the subcontribution. 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.
* __description__: Description of the subcontribution. 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.
* __list_of_persons__: List of persons of the subcontribution. Stored as a nested object (This field cannot be flatten since the searches are done for a specific person of a specific organization or role) with two fields:
- __name__: Name of the person. Stored both as keyword and text, for exact match and full-text search.
- __affiliation__: Affiliation of the person. Stored as text for full-text search.
- __role__: Role(s) of the person. Stored as keyword for exact match.
- jsonschema path: '/cernsearch/jsonschemas/indico/subcontribution_v1.0.0.json'
- 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
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