Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
webservices
cern-search
cern-search-rest-api
Commits
8e6617bc
Commit
8e6617bc
authored
Mar 18, 2019
by
Pablo Panero
Browse files
mappings/jsonschemas[test]: refactor to comply with _data field
parent
f591988c
Changes
12
Hide whitespace changes
Inline
Side-by-side
cern_search_rest_api/modules/cernsearch/jsonschemas/test/test/api_ubq_v0.0.
1
.json
→
cern_search_rest_api/modules/cernsearch/jsonschemas/test/test/api_ubq_v0.0.
2
.json
View file @
8e6617bc
{
"title"
:
"Custom record schema
for collec
tion v0.0.
1
"
,
"id"
:
"http://localhost:5000/schemas/
cernsearch-
test/api_ubq_v0.0.
1
.json"
,
"$schema"
:
"http://localhost:5000/schemas/
cernsearch-
test/api_ubq_v0.0.
1
.json"
,
"title"
:
"Custom record schema
to test Update By Query opera
tion
s
v0.0.
2
"
,
"id"
:
"http://localhost:5000/schemas/test/api_ubq_v0.0.
2
.json"
,
"$schema"
:
"http://localhost:5000/schemas/test/api_ubq_v0.0.
2
.json"
,
"type"
:
"object"
,
"properties"
:
{
"_access"
:
{
...
...
@@ -33,10 +33,13 @@
}
}
},
"links"
:{
"type"
:
"array"
,
"items"
:
{
"type"
:
"object"
"_data"
:
{
"type"
:
"object"
,
"links"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"object"
}
}
},
"control_number"
:
{
...
...
cern_search_rest_api/modules/cernsearch/jsonschemas/test/test/binary_v0.0.
1
.json
→
cern_search_rest_api/modules/cernsearch/jsonschemas/test/test/binary_v0.0.
2
.json
View file @
8e6617bc
{
"title"
:
"Custom record schema v0.0.1"
,
"id"
:
"http://localhost:5000/schemas/
cernsearch-
test/binary_v0.0.1.json"
,
"$schema"
:
"http://localhost:5000/schemas/
cernsearch-
test/binary_v0.0.1.json"
,
"id"
:
"http://localhost:5000/schemas/test/binary_v0.0.1.json"
,
"$schema"
:
"http://localhost:5000/schemas/test/binary_v0.0.1.json"
,
"type"
:
"object"
,
"properties"
:
{
"_access"
:
{
...
...
@@ -33,43 +33,46 @@
}
}
},
"title"
:
{
"type"
:
"string"
,
"description"
:
"Record title."
},
"description"
:
{
"type"
:
"string"
,
"description"
:
"Description for record."
},
"link"
:
{
"type"
:
"string"
,
"description"
:
"URL where to find the original file."
},
"b64"
:
{
"type"
:
"string"
,
"description"
:
"Base64 encoded binary file."
},
"content"
:
{
"_data"
:
{
"type"
:
"object"
,
"description"
:
"Extracted content of the binary file"
,
"properties"
:
{
"content"
:
{
"type"
:
"string"
},
"title"
:
{
"type"
:
"string"
},
"keywords"
:
{
"type"
:
"array"
,
"items"
:
{
"title"
:
{
"type"
:
"string"
,
"description"
:
"Record title."
},
"description"
:
{
"type"
:
"string"
,
"description"
:
"Description for record."
},
"link"
:
{
"type"
:
"string"
,
"description"
:
"URL where to find the original file."
},
"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"
}
},
"author"
:{
"type"
:
"string"
},
"content_type"
:
{
"type"
:
"string"
}
}
},
...
...
cern_search_rest_api/modules/cernsearch/jsonschemas/test/test/collection_v0.0.1.json
deleted
100644 → 0
View file @
f591988c
{
"title"
:
"Custom record schema for collection v0.0.1"
,
"id"
:
"http://localhost:5000/schemas/cernsearch-test/collection_v0.0.1.json"
,
"$schema"
:
"http://localhost:5000/schemas/cernsearch-test/collection_v0.0.1.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"
}
}
}
},
"minutes"
:
{
"type"
:
"string"
,
"description"
:
"Record title."
},
"content"
:
{
"type"
:
"string"
,
"description"
:
"Description for record."
},
"authors"
:
{
"type"
:
"string"
,
"description"
:
"Description for record."
},
"control_number"
:
{
"type"
:
"string"
},
"$schema"
:
{
"type"
:
"string"
}
}
}
\ No newline at end of file
cern_search_rest_api/modules/cernsearch/jsonschemas/test/test/date_v0.0.
1
.json
→
cern_search_rest_api/modules/cernsearch/jsonschemas/test/test/date_v0.0.
2
.json
View file @
8e6617bc
{
"title"
:
"Custom record schema v0.0.
1
"
,
"id"
:
"http://localhost:5000/schemas/test/
test-
date_v0.0.
1
.json"
,
"$schema"
:
"http://localhost:5000/schemas/test/
test-
date_v0.0.
1
.json"
,
"title"
:
"Custom record schema v0.0.
2
"
,
"id"
:
"http://localhost:5000/schemas/test/date_v0.0.
2
.json"
,
"$schema"
:
"http://localhost:5000/schemas/test/date_v0.0.
2
.json"
,
"type"
:
"object"
,
"properties"
:
{
"_access"
:
{
...
...
@@ -33,20 +33,23 @@
}
}
},
"parents"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"object"
"_data"
:{
"type"
:
"object"
,
"parents"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"object"
}
},
"title"
:
{
"type"
:
"string"
,
"description"
:
"Record title."
},
"record_date"
:
{
"type"
:
"string"
,
"description"
:
"Creation date of the record."
}
},
"title"
:
{
"type"
:
"string"
,
"description"
:
"Record title."
},
"record_date"
:
{
"type"
:
"string"
,
"description"
:
"Creation date of the record."
},
"control_number"
:
{
"type"
:
"string"
},
...
...
cern_search_rest_api/modules/cernsearch/jsonschemas/test/test/nested_v0.0.
1
.json
→
cern_search_rest_api/modules/cernsearch/jsonschemas/test/test/nested_v0.0.
2
.json
View file @
8e6617bc
{
"title"
:
"Custom record schema v0.0.
1
"
,
"id"
:
"http://localhost:5000/schemas/
cernsearch-
test/
t
est
-doc
_v0.0.
1
.json"
,
"$schema"
:
"http://localhost:5000/schemas/
cernsearch-
test/
t
est
-doc
_v0.0.
1
.json"
,
"title"
:
"Custom record schema
for nested objects
v0.0.
2
"
,
"id"
:
"http://localhost:5000/schemas/test/
n
est
ed
_v0.0.
2
.json"
,
"$schema"
:
"http://localhost:5000/schemas/test/
n
est
ed
_v0.0.
2
.json"
,
"type"
:
"object"
,
"properties"
:
{
"_access"
:
{
...
...
@@ -33,16 +33,19 @@
}
}
},
"parents"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"object"
}
},
"nparents"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"object"
"data"
:
{
"type"
:
"object"
,
"parents"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"object"
}
},
"nparents"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"object"
}
}
},
"control_number"
:
{
...
...
cern_search_rest_api/modules/cernsearch/jsonschemas/test/test/permission_v0.0.
1
.json
→
cern_search_rest_api/modules/cernsearch/jsonschemas/test/test/permission_v0.0.
2
.json
View file @
8e6617bc
{
"title"
:
"Custom record schema v0.0.
1
"
,
"id"
:
"http://localhost:5000/schemas/
cernsearch-test/test-doc
_v0.0.
1
.json"
,
"$schema"
:
"http://localhost:5000/schemas/
cernsearch-test/test-doc
_v0.0.
1
.json"
,
"title"
:
"Custom record schema
for permissions
v0.0.
2
"
,
"id"
:
"http://localhost:5000/schemas/
test/permission
_v0.0.
2
.json"
,
"$schema"
:
"http://localhost:5000/schemas/
test/permission
_v0.0.
2
.json"
,
"type"
:
"object"
,
"properties"
:
{
"_access"
:
{
...
...
@@ -33,11 +33,14 @@
}
}
},
"content"
:
{
"type"
:
"string"
},
"control_number"
:
{
"type"
:
"string"
"_data"
:
{
"type"
:
"object"
,
"content"
:
{
"type"
:
"string"
},
"control_number"
:
{
"type"
:
"string"
}
},
"$schema"
:
{
"type"
:
"string"
...
...
cern_search_rest_api/modules/cernsearch/mappings/test/v6/test/api_ubq_v0.0.
1
.json
→
cern_search_rest_api/modules/cernsearch/mappings/test/v6/test/api_ubq_v0.0.
2
.json
View file @
8e6617bc
...
...
@@ -4,7 +4,7 @@
"index.mapping.total_fields.limit"
:
3000
},
"mappings"
:
{
"api_ubq_v0.0.
1
"
:
{
"api_ubq_v0.0.
2
"
:
{
"numeric_detection"
:
true
,
"_meta"
:
{
"_owner"
:
"CernSearch-Administrators@cern.ch"
...
...
@@ -27,8 +27,13 @@
}
}
},
"links"
:{
"type"
:
"nested"
"_data"
:
{
"type"
:
"object"
,
"properties"
:
{
"links"
:
{
"type"
:
"nested"
}
}
},
"control_number"
:
{
"type"
:
"keyword"
...
...
cern_search_rest_api/modules/cernsearch/mappings/test/v6/test/binary_v0.0.
1
.json
→
cern_search_rest_api/modules/cernsearch/mappings/test/v6/test/binary_v0.0.
2
.json
View file @
8e6617bc
...
...
@@ -4,7 +4,7 @@
"index.mapping.total_fields.limit"
:
3000
},
"mappings"
:
{
"binary_v0.0.
1
"
:
{
"binary_v0.0.
2
"
:
{
"numeric_detection"
:
true
,
"_meta"
:
{
"_owner"
:
"CernSearch-Administrators@cern.ch"
...
...
@@ -27,56 +27,80 @@
}
}
},
"_search_all"
:
{
"type"
:
"keyword"
,
"fields"
:
{
"english"
:
{
"type"
:
"text"
,
"analyzer"
:
"english"
},
"french"
:
{
"type"
:
"text"
,
"analyzer"
:
"french"
}
}
},
"title"
:
{
"type"
:
"text"
,
"copy_to"
:
"_search_all"
},
"description"
:
{
"type"
:
"text"
,
"copy_to"
:
"_search_all"
},
"link"
:
{
"type"
:
"keyword"
,
"copy_to"
:
"_search_all"
},
"b64"
:
{
"enabled"
:
false
},
"content"
:
{
"_data"
:
{
"type"
:
"object"
,
"properties"
:
{
"content"
:{
"type"
:
"text"
,
"copy_to"
:
"_search_all"
},
"title"
:
{
"type"
:
"keyword"
,
"copy_to"
:
"_search_all"
"fields"
:
{
"english"
:
{
"type"
:
"text"
,
"analyzer"
:
"english"
},
"french"
:
{
"type"
:
"text"
,
"analyzer"
:
"french"
}
}
},
"keywords"
:
{
"type"
:
"keyword"
,
"copy_to"
:
"_search_all"
"description"
:
{
"type"
:
"text"
,
"fields"
:
{
"english"
:
{
"type"
:
"text"
,
"analyzer"
:
"english"
},
"french"
:
{
"type"
:
"text"
,
"analyzer"
:
"french"
}
}
},
"author"
:
{
"type"
:
"keyword"
,
"copy_to"
:
"_search_all"
"link"
:
{
"type"
:
"keyword"
},
"content_type"
:
{
"type"
:
"keyword"
,
"copy_to"
:
"_search_all"
"b64"
:
{
"enabled"
:
false
},
"content"
:
{
"type"
:
"object"
,
"properties"
:
{
"content"
:
{
"type"
:
"text"
,
"fields"
:
{
"english"
:
{
"type"
:
"text"
,
"analyzer"
:
"english"
},
"french"
:
{
"type"
:
"text"
,
"analyzer"
:
"french"
}
}
},
"title"
:
{
"type"
:
"keyword"
,
"fields"
:
{
"english"
:
{
"type"
:
"text"
,
"analyzer"
:
"english"
},
"french"
:
{
"type"
:
"text"
,
"analyzer"
:
"french"
}
}
},
"keywords"
:
{
"type"
:
"keyword"
},
"author"
:
{
"type"
:
"keyword"
},
"content_type"
:
{
"type"
:
"keyword"
}
}
}
}
},
...
...
cern_search_rest_api/modules/cernsearch/mappings/test/v6/test/date_v0.0.1.json
deleted
100644 → 0
View file @
f591988c
{
"settings"
:
{
"index.percolator.map_unmapped_fields_as_string"
:
true
,
"index.mapping.total_fields.limit"
:
3000
},
"mappings"
:
{
"date_v0.0.1"
:
{
"numeric_detection"
:
true
,
"_meta"
:
{
"_owner"
:
"CernSearch-Administrators@cern.ch"
},
"properties"
:
{
"_access"
:
{
"type"
:
"object"
,
"properties"
:
{
"owner"
:{
"type"
:
"keyword"
},
"read"
:
{
"type"
:
"keyword"
},
"update"
:
{
"type"
:
"keyword"
},
"delete"
:
{
"type"
:
"keyword"
}
}
},
"_search_all"
:
{
"type"
:
"text"
,
"fields"
:
{
"english"
:
{
"type"
:
"text"
,
"analyzer"
:
"english"
},
"french"
:
{
"type"
:
"text"
,
"analyzer"
:
"french"
}
}
},
"title"
:
{
"type"
:
"keyword"
,
"copy_to"
:
"_search_all"
},
"record_date"
:
{
"type"
:
"date"
,
"format"
:
"yyyy-MM-dd'T'HH:mm:ss"
},
"control_number"
:
{
"type"
:
"keyword"
},
"$schema"
:
{
"enabled"
:
false
}
}
}
}
}
\ No newline at end of file
cern_search_rest_api/modules/cernsearch/mappings/test/v6/test/
nes
te
d
_v0.0.
1
.json
→
cern_search_rest_api/modules/cernsearch/mappings/test/v6/test/
da
te_v0.0.
2
.json
View file @
8e6617bc
...
...
@@ -4,7 +4,7 @@
"index.mapping.total_fields.limit"
:
3000
},
"mappings"
:
{
"
nes
te
d
_v0.0.
1
"
:
{
"
da
te_v0.0.
2
"
:
{
"numeric_detection"
:
true
,
"_meta"
:
{
"_owner"
:
"CernSearch-Administrators@cern.ch"
...
...
@@ -27,35 +27,25 @@
}
}
},
"
parents
"
:
{
"
data
"
:
{
"type"
:
"object"
,
"properties"
:
{
"type"
:
{
"type"
:
"keyword"
},
"id"
:
{
"type"
:
"text"
,
"title"
:
{
"type"
:
"keyword"
,
"fields"
:
{
"keyword"
:
{
"type"
:
"keyword"
"english"
:
{
"type"
:
"text"
,
"analyzer"
:
"english"
},
"french"
:
{
"type"
:
"text"
,
"analyzer"
:
"french"
}
}
}
}
},
"nested_parents"
:
{
"type"
:
"nested"
,
"properties"
:
{
"type"
:
{
"type"
:
"keyword"
},
"id"
:
{
"type"
:
"text"
,
"fields"
:
{
"keyword"
:
{
"type"
:
"keyword"
}
}
"record_date"
:
{
"type"
:
"date"
,
"format"
:
"yyyy-MM-dd'T'HH:mm:ss"
}
}