Commit 68762549 authored by Michal Kolodziejski's avatar Michal Kolodziejski 🐛 Committed by Carina Antunes
Browse files

Add Indico schemas and aggregations

parent 0ce16622
......@@ -197,6 +197,19 @@ RECORDS_REST_FACETS = {
'name_match': simple_query_string("_data.name"),
'url_match': simple_query_string("url"),
}
},
'indico': {
'aggs': {
'event_type': {
'terms': {'field': '_data.event_type'}
},
'speakers_chairs': {
'terms': {'field': '_data.speakers_chairs.exact_match'}
},
'list_of_persons': {
'terms': {'field': '_data.list_of_persons.exact_match'}
}
}
}
}
......
{
"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",
"id": "http://<host:port>/schemas/indico/attachments_v1.0.0.json",
"$schema": "http://<host:port>/schemas/indico/attachments_v1.0.0.json",
"type": "object",
"properties": {
"_access": {
"type": "object",
"properties": {
"owner":{
"owner": {
"type": "array",
"items": {
"type": "string"
}
},
"read":{
"read": {
"type": "array",
"items": {
"type": "string"
}
},
"update":{
"update": {
"type": "array",
"items": {
"type": "string"
}
},
"delete":{
"delete": {
"type": "array",
"items": {
"type": "string"
......@@ -33,46 +33,52 @@
}
}
},
"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."
},
"contribution_id": {
"type": "string",
"description": "Contribution id.",
"required": false
},
"subcontribution_id": {
"type": "string",
"description": "Event id.",
"required": false
"_data": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Attachments id."
},
"category_path": {
"type": "array",
"items": {
"type": "string"
},
"description": "Attachments category path (ordered array)."
},
"event_id": {
"type": "integer",
"description": "Event id."
},
"contribution_id": {
"type": "integer",
"description": "Contribution id.",
"required": false
},
"subcontribution_id": {
"type": "integer",
"description": "Event id.",
"required": false
},
"filename": {
"type": "string",
"description": "Attachments filename."
},
"content": {
"type": "string",
"description": "Attachments content."
},
"url": {
"type": "string",
"description": "Full path Attachment URL"
}
}
},
"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"
}
......
{
"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",
"id": "http://<host:port>/schemas/indico/contributions_v1.0.0.json",
"$schema": "http://<host:port>/schemas/indico/contributions_v1.0.0.json",
"type": "object",
"properties": {
"_access": {
"type": "object",
"properties": {
"owner":{
"owner": {
"type": "array",
"items": {
"type": "string"
}
},
"read":{
"read": {
"type": "array",
"items": {
"type": "string"
}
},
"update":{
"update": {
"type": "array",
"items": {
"type": "string"
}
},
"delete":{
"delete": {
"type": "array",
"items": {
"type": "string"
......@@ -33,24 +33,48 @@
}
}
},
"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."
"_data": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Contributions id."
},
"category_path": {
"type": "array",
"items": {
"type": "string"
},
"description": "Contributions category path (ordered array)."
},
"event_id": {
"type": "integer",
"description": "Event id."
},
"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": "string"
},
"description": "Contributions person's name, affiliation."
},
"url": {
"type": "string",
"description": "Full path Contribution URL"
}
}
},
"start_date": {
"type": "string",
......@@ -60,44 +84,6 @@
"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"
}
......
{
"title": "Indico Event schema v1.0.0",
"id": "http://localhost:5000/schemas/indico/events_v1.0.0.json",
"$schema": "http://localhost:5000/schemas/indico/events_v1.0.0.json",
"id": "http://<host:port>/schemas/indico/events_v1.0.0.json",
"$schema": "http://<host:port>/schemas/indico/events_v1.0.0.json",
"type": "object",
"properties": {
"_access": {
"type": "object",
"properties": {
"owner":{
"owner": {
"type": "array",
"items": {
"type": "string"
}
},
"read":{
"read": {
"type": "array",
"items": {
"type": "string"
}
},
"update":{
"update": {
"type": "array",
"items": {
"type": "string"
}
},
"delete":{
"delete": {
"type": "array",
"items": {
"type": "string"
......@@ -33,20 +33,48 @@
}
}
},
"id": {
"type": "string",
"description": "Event id."
},
"category_path": {
"type": "array",
"items": {
"type": "string"
},
"description": "Event category path (ordered array)."
},
"event_type": {
"type": "string",
"description": "Event type."
"_data": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Event id."
},
"category_path": {
"type": "array",
"items": {
"type": "string"
},
"description": "Event category path (ordered array)."
},
"event_type": {
"type": "string",
"description": "Event type."
},
"location": {
"type": "string",
"description": "Event location."
},
"title": {
"type": "string",
"description": "Event title."
},
"description": {
"type": "string",
"description": "Event description."
},
"speakers_chairs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Event speaker/chair name, affiliation."
},
"url": {
"type": "string",
"description": "Full path Event URL"
}
}
},
"creation_date": {
"type": "string",
......@@ -60,37 +88,6 @@
"type": "string",
"description": "Event end date."
},
"location": {
"type": "string",
"description": "Event location."
},
"title": {
"type": "string",
"description": "Event title."
},
"description": {
"type": "string",
"description": "Event description."
},
"speakers_chairs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Event speaker/chair name."
},
"affiliation": {
"type": "string",
"description": "Event speaker/chair affiliation."
}
}
}
},
"custom_pid": {
"type": "string"
},
"$schema": {
"type": "string"
}
......
{
"title": "Indico Notes schema v1.0.0",
"id": "http://localhost:5000/schemas/indico/notes_v1.0.0.json",
"$schema": "http://localhost:5000/schemas/indico/notes_v1.0.0.json",
"id": "http://<host:port>/schemas/indico/notes_v1.0.0.json",
"$schema": "http://<host:port>/schemas/indico/notes_v1.0.0.json",
"type": "object",
"properties": {
"_access": {
"type": "object",
"properties": {
"owner":{
"owner": {
"type": "array",
"items": {
"type": "string"
}
},
"read":{
"read": {
"type": "array",
"items": {
"type": "string"
}
},
"update":{
"update": {
"type": "array",
"items": {
"type": "string"
}
},
"delete":{
"delete": {
"type": "array",
"items": {
"type": "string"
......@@ -33,42 +33,53 @@
}
}
},
"id": {
"type": "string",
"description": "Notes id."
},
"category_path": {
"type": "array",
"items": {
"type": "string"
},
"description": "Notes category path (ordered array)."
},
"event_id": {
"type": "string",
"description": "Notes id."
},
"contribution_id": {
"type": "string",
"description": "Notes id.",
"required": false
},
"subcontribution_id": {
"type": "string",
"description": "Notes id.",
"required": false
"_data": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Notes id."
},
"category_path": {
"type": "array",
"items": {
"type": "string"
},
"description": "Notes category path (ordered array)."
},
"event_id": {
"type": "integer",
"description": "Notes id."
},
"contribution_id": {
"type": "integer",
"description": "Notes id.",
"required": false
},
"subcontribution_id": {
"type": "integer",
"description": "Notes id.",
"required": false
},
"session_id": {
"type": "integer",
"description": "Notes id.",
"required": false
},
"content": {
"type": "string",
"description": "Attachments content."
},
"url": {
"type": "string",
"description": "Full path Note URL"
}
}
},
"creation_date": {
"type": "string",
"description": "Attachments creation date."
},
"content": {
"type": "string",
"description": "Attachments content."
},
"custom_pid": {
"type": "string"
},
"$schema": {
"type": "string"
}
......
{
"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",
"id": "http://<host:port>/schemas/indico/subcontributions_v1.0.0.json",
"$schema": "http://<host:port>/schemas/indico/subcontributions_v1.0.0.json",
"type": "object",
"properties": {
"_access": {
"type": "object",
"properties": {
"owner":{
"owner": {
"type": "array",
"items": {