Commit 7b29992a authored by Pablo Panero's avatar Pablo Panero
Browse files

jsonschemas/mapping[edms]: refactor to comply with _data field pattern

parent f4c6df5f
{
"title": "EDMS Object Type Document schema v1.0.0",
"id": "http://0.0.0.0:5000/schemas/edms/document_v1.0.0.json",
"$schema": "http://0.0.0.0:5000/schemas/edms/document_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"
}
}
}
},
"object_type": {
"type": "string"
},
"cid": {
"enabled": false
},
"document_id": {
"type": "integer"
},
"cern_id": {
"type": "string"
},
"version": {
"type": "string"
},
"latest_version": {
"type": "boolean"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creation_date": {
"type": "string"
},
"modification_date": {
"type": "string"
},
"context": {
"type": "string"
},
"document_type": {
"type": "string"
},
"release_procedure": {
"type": "string"
},
"status": {
"type": "string"
},
"obsolete": {
"type": "boolean"
},
"author": {
"type": "string"
},
"keywords": {
"type": "string"
},
"equipment_code": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "string"
}
},
"properties": {
"type": "array",
"items": {
"type": "object"
}
},
"parents": {
"type": "array",
"items": {
"type": "object"
}
},
"custom_pid": {
"type": "string"
},
"$schema": {
"type": "string"
}
}
}
\ No newline at end of file
{
"title": "EDMS Object Type Document schema v2.0.0",
"id": "http://0.0.0.0:5000/schemas/edms/document_v2.0.0.json",
"$schema": "http://0.0.0.0:5000/schemas/edms/document_v2.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"
}
}
}
},
"_data": {
"type": "object",
"properties": {
"object_type": {
"type": "string"
},
"cid": {
"type": "integer"
},
"document_id": {
"type": "integer"
},
"cern_id": {
"type": "string"
},
"version": {
"type": "string"
},
"latest_version": {
"type": "boolean"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creation_date": {
"type": "string"
},
"modification_date": {
"type": "string"
},
"context": {
"type": "string"
},
"document_type": {
"type": "string"
},
"release_procedure": {
"type": "string"
},
"status": {
"type": "string"
},
"obsolete": {
"type": "boolean"
},
"author": {
"type": "string"
},
"keywords": {
"type": "string"
},
"equipment_code": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "string"
}
},
"object_properties": {
"type": "array",
"items": {
"type": "object"
}
},
"parents": {
"type": "array",
"items": {
"type": "object"
}
}
}
},
"control_number": {
"type": "string"
},
"$schema": {
"type": "string"
}
}
}
\ No newline at end of file
{
"title": "EDMS Object Type File schema v1.0.0",
"id": "http://0.0.0.0:5000/schemas/edms/file_v1.0.0.json",
"$schema": "http://0.0.0.0:5000/schemas/edms/file_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"}
}
}
},
"object_type": {
"type": "string"
},
"cid": {
"type": "integer"
},
"document_id": {
"type": "integer"
},
"cern_id": {
"type": "string"
},
"file_id": {
"type": "integer"
},
"version": {
"type": "string"
},
"latest_version": {
"type": "boolean"
},
"title": {
"type": "string"
},
"file_name": {
"type": "string"
},
"description": {
"type": "string"
},
"creation_date": {
"type": "string"
},
"modification_date": {
"type": "string"
},
"context": {
"type": "string"
},
"document_type": {
"type": "string"
},
"release_procedure": {
"type": "string"
},
"status": {
"type": "string"
},
"obsolete": {
"type": "boolean"
},
"author": {
"type": "string"
},
"keywords": {
"type": "string"
},
"equipment_code": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "string"
}
},
"object_properties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"value": {"type": "string"}
}
}
},
"parents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"parent_type": {"type": "string"},
"parent_id": {"type": "string"}
}
}
},
"b64": {
"type": "string",
"description": "Base64 encoded binary file."
},
"content": {
"type": "object",
"description": "Extracted content of the binary file",
"properties": {
"content": {"type": "string"},
"title": {"type": "string"},
"keywords": {
"type": "array",
"items": {"type": "string"}
},
"author":{"type": "string"},
"content_type": {"type": "string"}
}
},
"custom_pid": {
"type": "string"
},
"$schema": {
"type": "string"
}
}
}
\ No newline at end of file
{
"title": "EDMS Object Type File schema v1.0.0",
"id": "http://0.0.0.0:5000/schemas/edms/file_v2.0.0.json",
"$schema": "http://0.0.0.0:5000/schemas/edms/file_v2.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"}
}
}
},
"_data": {
"type": "object",
"properties": {
"object_type": {
"type": "string"
},
"cid": {
"type": "integer"
},
"document_id": {
"type": "integer"
},
"cern_id": {
"type": "string"
},
"file_id": {
"type": "integer"
},
"version": {
"type": "string"
},
"latest_version": {
"type": "boolean"
},
"title": {
"type": "string"
},
"file_name": {
"type": "string"
},
"description": {
"type": "string"
},
"creation_date": {
"type": "string"
},
"modification_date": {
"type": "string"
},
"context": {
"type": "string"
},
"document_type": {
"type": "string"
},
"release_procedure": {
"type": "string"
},
"status": {
"type": "string"
},
"obsolete": {
"type": "boolean"
},
"author": {
"type": "string"
},
"keywords": {
"type": "string"
},
"equipment_code": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "string"
}
},
"object_properties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"parents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"parent_type": {
"type": "string"
},
"parent_id": {
"type": "string"
}
}
}
},
"b64": {
"type": "string",
"description": "Base64 encoded binary file."
},
"content": {
"type": "object",
"description": "Extracted content of the binary file",
"properties": {
"content": {
"type": "string"
},
"title": {
"type": "string"
},
"keywords": {
"type": "array",
"items": {
"type": "string"
}
},
"author": {
"type": "string"
},
"content_type": {
"type": "string"
}
}
}
}
},
"control_number": {
"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": 500
},
"mappings": {
"document_v1.0.0": {
"numeric_detection": true,
"_meta": {
"_owner": "CernSearch-Administrators@cern.ch,en-dep-ace-edm@cern.ch",
"_comment": "Fields to ignore for global search obsolete, latest_version, (version, obsolete, release_procedure, status)"
},
"properties": {
"_access": {
"type": "object",
"properties": {
"owner":{"type": "keyword"},
"read": {"type": "keyword"},
"update": {"type": "keyword"},
"delete": {"type": "keyword"}
}
},
"_search_all": {
"type": "keyword",
"fields": {
"english": {
"type": "text",
"analyzer": "english"
},
"french": {
"type": "text",
"analyzer": "french"
}