diff options
Diffstat (limited to 'search-data-service-app/src/test/resources/json')
15 files changed, 356 insertions, 0 deletions
diff --git a/search-data-service-app/src/test/resources/json/analysis-config.json b/search-data-service-app/src/test/resources/json/analysis-config.json new file mode 100644 index 0000000..a622dcf --- /dev/null +++ b/search-data-service-app/src/test/resources/json/analysis-config.json @@ -0,0 +1,21 @@ +[ + { + "name": "nGram_analyzer", + "description": "NGram Analyzer", + "tokenizer": "whitespace", + "filters": [ + "lowercase", + "asciifolding", + "nGram_filter" + ] + }, + { + "name": "whitespace_analyzer", + "description": "Whitespace Analyzer", + "tokenizer": "whitespace", + "filters": [ + "lowercase", + "asciifolding" + ] + } +]
\ No newline at end of file diff --git a/search-data-service-app/src/test/resources/json/bulk-ops-invalid.json b/search-data-service-app/src/test/resources/json/bulk-ops-invalid.json new file mode 100644 index 0000000..4708498 --- /dev/null +++ b/search-data-service-app/src/test/resources/json/bulk-ops-invalid.json @@ -0,0 +1,32 @@ +{ + "operations": [ + { + "operation": "create", + "meta-data": { + "index": "test-index" + }, + "document": { + "field1": "value1", + "field2": "value2" + } + }, + { + "operation": "dance!", + "meta-data": { + "index": "test-index", + "id": "2", + "version": "5" + }, + "document": { + "field1": "new-value" + } + }, + { + "operation": "delete", + "meta-data": { + "index": "test-index", + "id": "4" + } + } + ] +}
\ No newline at end of file diff --git a/search-data-service-app/src/test/resources/json/bulk-ops-valid.json b/search-data-service-app/src/test/resources/json/bulk-ops-valid.json new file mode 100644 index 0000000..6e805cf --- /dev/null +++ b/search-data-service-app/src/test/resources/json/bulk-ops-valid.json @@ -0,0 +1,31 @@ +[ + { + "create": { + "metaData": { + "url": "/indexes/test-index/documents/" + }, + "document": { + "field1": "value1", + "field2": "value2" + } + } + }, + { + "update": { + "metaData": { + "url": "/indexes/test-index/documents/3", + "etag": "5" + }, + "document": { + "field1": "new-value" + } + } + }, + { + "delete": { + "metaData": { + "url": "/indexes/test-index/documents/7" + } + } + } +] diff --git a/search-data-service-app/src/test/resources/json/dynamic-custom-template.json b/search-data-service-app/src/test/resources/json/dynamic-custom-template.json new file mode 100644 index 0000000..a7bd5ae --- /dev/null +++ b/search-data-service-app/src/test/resources/json/dynamic-custom-template.json @@ -0,0 +1,12 @@ +"dynamic_templates":[ + { + "strings":{ + "match_mapping_type":"string", + "match": "*", + "mapping":{ + "type":"text", + "fielddata":true + } + } + } +],
\ No newline at end of file diff --git a/search-data-service-app/src/test/resources/json/dynamicIndex.json b/search-data-service-app/src/test/resources/json/dynamicIndex.json new file mode 100644 index 0000000..5df4069 --- /dev/null +++ b/search-data-service-app/src/test/resources/json/dynamicIndex.json @@ -0,0 +1,17 @@ +{ + "mappings": { + "dynamic_templates": [{ + "strings": { + "match_mapping_type": "string", + "match": "*", + "mapping": { + "type": "string", + "index": "not_analyzed" + } + } + } + ] + } + + +}
\ No newline at end of file diff --git a/search-data-service-app/src/test/resources/json/es-payload-translation.json b/search-data-service-app/src/test/resources/json/es-payload-translation.json new file mode 100644 index 0000000..58ed8f6 --- /dev/null +++ b/search-data-service-app/src/test/resources/json/es-payload-translation.json @@ -0,0 +1,16 @@ +{ + "attr-translations": [ + { + "query": "$..[?(@.type=='string' && @.index=='analyzed')]", + "update": {"type": "text", "index": true, "fielddata": true} + }, + { + "query": "$..[?(@.type=='string' && @.index=='not_analyzed')]", + "update": {"type": "keyword", "index": true} + }, + { + "query": "$..[?(@.type=='string' && !@.index)]", + "update": {"type": "text", "fielddata": true} + } + ] +}
\ No newline at end of file diff --git a/search-data-service-app/src/test/resources/json/filter-config.json b/search-data-service-app/src/test/resources/json/filter-config.json new file mode 100644 index 0000000..d1de1d7 --- /dev/null +++ b/search-data-service-app/src/test/resources/json/filter-config.json @@ -0,0 +1,7 @@ +[ + { + "name": "nGram_filter", + "description": "Custom NGram Filter.", + "configuration": " \"type\": \"nGram\", \"min_gram\": 1, \"max_gram\": 50, \"token_chars\": [ \"letter\", \"digit\", \"punctuation\", \"symbol\" ]" + } +]
\ No newline at end of file diff --git a/search-data-service-app/src/test/resources/json/index-mapping.json b/search-data-service-app/src/test/resources/json/index-mapping.json new file mode 100644 index 0000000..e447092 --- /dev/null +++ b/search-data-service-app/src/test/resources/json/index-mapping.json @@ -0,0 +1,28 @@ +{ + "fields": [ + {"name": "validationId", "type": "string", "searchable": false}, + {"name": "validationTimestamp1", "type": "date", "format": "MMM d y HH:m:s||dd-MM-yyyy HH:mm:ss||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||MM\/dd\/yyyy||yyyyMMdd'T'HHmmssZ"}, + {"name": "entityId", "type": "nested"}, + {"name": "entityType", "type": "string", "index": "analyzed"}, + {"name": "entityLink", "type": "string"}, + + {"name": "resourceVersion", "type": "string", "index": "not_analyzed"}, + {"name": "violations", "type": "nested", "sub-fields": [ + {"name": "violationId", "type": "string"}, + {"name": "violationTimestamp", "type": "date", "format": "MMM d y HH:m:s||dd-MM-yyyy HH:mm:ss||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||MM\/dd\/yyyy||yyyyMMdd'T'HHmmssZ"}, + {"name": "modelName", "type": "string"}, + {"name": "category", "type": "string"}, + {"name": "severity", "type": "string"}, + {"name": "violationType", "type": "string"}, + {"name": "validationRule", "type": "string"}, + {"name": "violationDetails", "type": "nested", "sub-fields": [ + {"name": "entityId", "type": "nested"}, + {"name": "entityType", "type": "string"}, + {"name": "modelName", "type": "string"}, + {"name": "MISSING_REL", "type": "string"} + ]}, + {"name": "errorMessage", "type": "string", "errMsg": "Sample error message for whitespace check"} + ]} + ] + +} diff --git a/search-data-service-app/src/test/resources/json/nested-document.json b/search-data-service-app/src/test/resources/json/nested-document.json new file mode 100644 index 0000000..8373a6d --- /dev/null +++ b/search-data-service-app/src/test/resources/json/nested-document.json @@ -0,0 +1,49 @@ +{ + "fields": [ + { + "name": "serverName", + "data-type": "string", + "searchable": true, + "search-analyzer": "whitespace", + "sub-fields": [] + }, + { + "name": "serverComplex", + "data-type": "string", + "search-analyzer": "whitespace", + "sub-fields": [] + }, + { + "name": "address", + "data-type": "nested", + "sub-fields": [ + { + "name": "street", + "data-type": "string", + "sub-fields": [] + }, + { + "name": "city", + "data-type": "string", + "sub-fields": [] + }, + { + "name": "phone-numbers", + "data-type": "nested", + "sub-fields": [ + { + "name": "home", + "data-type": "string", + "sub-fields": [] + }, + { + "name": "cell", + "data-type": "string", + "sub-fields": [] + } + ] + } + ] + } + ] +} diff --git a/search-data-service-app/src/test/resources/json/queries/query-with-subrange.json b/search-data-service-app/src/test/resources/json/queries/query-with-subrange.json new file mode 100644 index 0000000..36e5f15 --- /dev/null +++ b/search-data-service-app/src/test/resources/json/queries/query-with-subrange.json @@ -0,0 +1,14 @@ +{ + "results-start": 0, + "results-size": 10, + "queries": [ + { + "must": { + "match": { + "field": "field1", + "value": "Bob" + } + } + } + ] +}
\ No newline at end of file diff --git a/search-data-service-app/src/test/resources/json/queries/simple-parsed-query.json b/search-data-service-app/src/test/resources/json/queries/simple-parsed-query.json new file mode 100644 index 0000000..50ce681 --- /dev/null +++ b/search-data-service-app/src/test/resources/json/queries/simple-parsed-query.json @@ -0,0 +1,10 @@ +{ + "queries": [ + { + "parsed-query": { + "field": "searchTags", + "query-string": "a" + } + } + ] +}
\ No newline at end of file diff --git a/search-data-service-app/src/test/resources/json/search_policy.json b/search-data-service-app/src/test/resources/json/search_policy.json new file mode 100644 index 0000000..b1abe3c --- /dev/null +++ b/search-data-service-app/src/test/resources/json/search_policy.json @@ -0,0 +1,63 @@ +{ + "roles": [ + { + "name": "testRole", + "functions": [{ + "name": "testFunction", + "methods": [{ + "name": "GET" + }, { + "name": "DELETE" + }, { + "name": "PUT" + } + ] + } + ], + "users": [{ + "username": "testUser" + } + + ] + }, + + { + "name": "devRole", + "functions": [{ + "name": "search", + "methods": [{ + "name": "GET" + }, { + "name": "DELETE" + }, { + "name": "PUT" + } + ] + } + ], + "users": [ + { + "username": "cn=onap, ou=onap, o=onap, l=ottawa, st=ontario, c=ca" + } + + ] + }, + + { + "name": "testBasicAuth", + "functions": [{ + "name": "testBasicAuthFuncyion", + "methods": [{ + "name": "GET" + } + ] + } + ], + "users": [{ + "user": "testBasicAuthUser", + "pass": "OBF:1ytc1vu91v2p1rxf1mqh1v8s1z0d1msn1san1mqf1z0h1v9u1msl1rvf1v1p1vv11yta" + } + ] + } + ] +}
\ No newline at end of file diff --git a/search-data-service-app/src/test/resources/json/settings-config.json b/search-data-service-app/src/test/resources/json/settings-config.json new file mode 100644 index 0000000..5ebdbcc --- /dev/null +++ b/search-data-service-app/src/test/resources/json/settings-config.json @@ -0,0 +1,9 @@ +{ + "number_of_shards": "5", + "replication": "TLV_DATACENTER:2", + "drop_on_delete_index": true, + "version": { + "created": "6020399" + } +} + diff --git a/search-data-service-app/src/test/resources/json/simpleDocument.json b/search-data-service-app/src/test/resources/json/simpleDocument.json new file mode 100644 index 0000000..c21c574 --- /dev/null +++ b/search-data-service-app/src/test/resources/json/simpleDocument.json @@ -0,0 +1,17 @@ +{ + "fields": [ + { + "name": "serverName", + "data-type": "string", + "searchable": true, + "search-analyzer": "whitespace", + "sub-fields": [] + }, + { + "name": "serverComplex", + "data-type": "string", + "search-analyzer": "whitespace", + "sub-fields": [] + } + ] +} diff --git a/search-data-service-app/src/test/resources/json/tier-support-document.json b/search-data-service-app/src/test/resources/json/tier-support-document.json new file mode 100644 index 0000000..c6a20db --- /dev/null +++ b/search-data-service-app/src/test/resources/json/tier-support-document.json @@ -0,0 +1,30 @@ +{ + "document-type": "tier-support", + "document-id": "ts-1", + "fields": [ + { + "name": "entityType", + "data-type": "string" + }, + { + "name": "edgeTagQueryEntityFieldName", + "data-type": "string", + "index": false + }, + { + "name": "edgeTagQueryEntityFieldValue", + "data-type": "string", + "index": false + }, + { + "name": "searchTagIDs", + "data-type": "string" + }, + { + "name": "searchTags", + "data-type": "string", + "index-analyzer": "nGram_analyzer", + "search-analyzer": "whitespace_analyzer" + } + ] +}
\ No newline at end of file |