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

mappins/jsonschema[edms]: add file schema, improve document

parent 121af638
......@@ -37,9 +37,9 @@
"type": "string"
},
"cid": {
"type": "integer"
"enabled": false
},
"id": {
"document_id": {
"type": "integer"
},
"cern_id": {
......
{
"title": "EDMS Object Type File schema v1.0.0",
"id": "http://0.0.0.0:5000/schemas/cernsearch-edms/file_v1.0.0.json",
"$schema": "http://0.0.0.0:5000/schemas/cernsearch-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"
},
"object_id": {
"type": "integer"
},
"cern_id": {
"type": "string"
},
"file_id": {
"type": "string"
},
"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
{
"settings": {
"index.percolator.map_unmapped_fields_as_string": true,
"index.mapping.total_fields.limit": 100
"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"
"_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"
}
"owner":{"type": "keyword"},
"read": {"type": "keyword"},
"update": {"type": "keyword"},
"delete": {"type": "keyword"}
}
},
"_search_all": {
"type": "text",
"type": "keyword",
"fields": {
"english": {
"type": "text",
......@@ -45,10 +38,9 @@
"copy_to": "_search_all"
},
"cid": {
"type": "keyword",
"copy_to": "_search_all"
"enabled": false
},
"id": {
"document_id": {
"type": "keyword",
"copy_to": "_search_all"
},
......@@ -113,7 +105,7 @@
"type": "keyword",
"copy_to": "_search_all"
},
"properties": {
"object_properties": {
"properties": {
"name": {
"type": "keyword",
......@@ -128,11 +120,11 @@
"parents": {
"type": "nested",
"properties": {
"type": {
"parent_type": {
"type": "keyword",
"copy_to": "_search_all"
},
"id": {
"parent_id": {
"type": "keyword",
"copy_to": "_search_all"
}
......
{
"settings": {
"index.percolator.map_unmapped_fields_as_string": true,
"index.mapping.total_fields.limit": 500
},
"mappings": {
"file_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"
}
}
},
"object_type": {
"type": "keyword",
"copy_to": "_search_all"
},
"cid": {
"enabled": false
},
"document_id": {
"type": "keyword",
"copy_to": "_search_all"
},
"cern_id": {
"type": "keyword",
"copy_to": "_search_all"
},
"file_id": {
"enabled": false
},
"version": {
"type": "keyword"
},
"latest_version": {
"type": "keyword"
},
"title": {
"type": "keyword",
"copy_to": "_search_all"
},
"file_name": {
"type": "keyword",
"copy_to": "_search_all"
},
"description": {
"type": "keyword",
"copy_to": "_search_all"
},
"creation_date": {
"type": "date",
"format": "yyyy-MM-dd'T'HH:mm:ss"
},
"modification_date": {
"type": "date",
"format": "yyyy-MM-dd'T'HH:mm:ss"
},
"context": {
"type": "keyword",
"copy_to": "_search_all"
},
"document_type": {
"type": "keyword",
"copy_to": "_search_all"
},
"release_procedure": {
"type": "keyword",
"copy_to": "_search_all"
},
"status": {
"type": "keyword",
"copy_to": "_search_all"
},
"obsolete": {
"type": "keyword"
},
"author": {
"type": "text",
"copy_to": "_search_all"
},
"keywords": {
"type": "text",
"copy_to": "_search_all"
},
"equipment_code": {
"type": "text",
"copy_to": "_search_all"
},
"attributes": {
"type": "keyword",
"copy_to": "_search_all"
},
"object_properties": {
"type": "object",
"properties": {
"name": {
"type": "keyword",
"copy_to": "_search_all"
},
"value": {
"type": "keyword",
"copy_to": "_search_all"
}
}
},
"parents": {
"type": "nested",
"properties": {
"parent_type": {
"type": "keyword",
"copy_to": "_search_all"
},
"parent_id": {
"type": "keyword",
"copy_to": "_search_all"
}
}
},
"b64": {
"enabled": false
},
"content": {
"type": "object",
"properties": {
"content":{
"type": "keyword",
"copy_to": "_search_all"
},
"title": {
"type": "keyword",
"copy_to": "_search_all"
},
"keywords": {
"type": "keyword",
"copy_to": "_search_all"
},
"author": {
"type": "keyword",
"copy_to": "_search_all"
},
"content_type": {
"type": "keyword",
"copy_to": "_search_all"
}
}
},
"custom_pid": {
"type": "keyword"
},
"$schema": {
"enabled": false
}
}
}
}
}
\ No newline at end of file
Supports Markdown
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