Commit 197023fb authored by Pablo Panero's avatar Pablo Panero
Browse files

Add: Indico Contributions JSONSchema, Mapping and documentation

parent 014b640d
{
"title": "Indico Contributions schema v1.0.0",
"id": "http://localhost:5000/schemas/indico/contributions_v1.0.0.json",
"$schema": "http://localhost:5000/schemas/indico/contributions_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": "Contributions id."
},
"category_path": {
"type": "array",
"items": {
"type": "string"
},
"description": "Contributions category path (ordered array)."
},
"event_id": {
"type": "string",
"description": "Event id."
},
"creation_date": {
"type": "string",
"description": "Contributions creation date."
},
"start_date": {
"type": "string",
"description": "Contributions start date."
},
"end_date": {
"type": "string",
"description": "Contributions end date."
},
"location": {
"type": "string",
"description": "Contributions location."
},
"title": {
"type": "string",
"description": "Contributions title."
},
"description": {
"type": "string",
"description": "Contributions description."
},
"list_of_persons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Contributions person's name."
},
"affiliation": {
"type": "string",
"description": "Contributions person's affiliation."
},
"role": {
"type": "array",
"items": {
"type": "string"
},
"description": "Contributions 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": {
"contributions_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"
},
"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
......@@ -37,3 +37,30 @@ Q: Title with 'keyword' field. Is exact match needed?
Q: speakers_chairs, both field should they be keyword, text or both? Analyzers will not do much good with 'custom' names.
### Contributions
--- v1.0.0 ---
The first version of the _Contributions_ mapping stores the information about an Indico contribution 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 contribution. Stored as keyword for exact match queries.
* __caterogy path__: Array containing the different path levels to which the contribution belongs to. Stored as keyword for exact match queries.
* __event_id__: ID of the event to which the contribution belongs to. Stored as keyword for exact match queries.
* __creation_date__: Creation date of the contribution. Stored as date with 'YYYY-MM-DDZHH:MM' format.
* __start_date__: Starting date of the contribution. Stored as date with 'YYYY-MM-DDZHH:MM' format.
* __end_date__: Ending date of the contribution. Stored as date with 'YYYY-MM-DDZHH:MM' format.
* __location__: Location/Place of the contribution. Stored as text for full-text search, only using ``standard`` analyzer.
* __title__: Title of the contribution. 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 contribution. 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 contribution. 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/contribution_v1.0.0.json'
- mapping path: '/cernsearch/mappings/v5/indico/contribution_v1.0.0.json'
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?
\ 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