diff options
author | Daniel Silverthorn <daniel.silverthorn@amdocs.com> | 2017-05-04 13:08:13 -0400 |
---|---|---|
committer | Daniel Silverthorn <daniel.silverthorn@amdocs.com> | 2017-05-09 12:05:00 -0400 |
commit | c75a08a749718fc5ef25f8c2f826939be657c0bf (patch) | |
tree | e2a2e29f8ebc54f6e2eeac6df63d8ca2189d39a0 /src/test/resources | |
parent | 30b899f10fb4fe638a973061bad6f8ba87003494 (diff) |
Initial search service commit
Changing common logging dep
Change-Id: I454697a9df0ee63f43d7b7d2a3818fe2d9b7bcf2
Signed-off-by: Daniel Silverthorn <daniel.silverthorn@amdocs.com>
Diffstat (limited to 'src/test/resources')
-rw-r--r-- | src/test/resources/json/analysis-config.json | 21 | ||||
-rw-r--r-- | src/test/resources/json/bulk-ops-invalid.json | 32 | ||||
-rw-r--r-- | src/test/resources/json/bulk-ops-valid.json | 31 | ||||
-rw-r--r-- | src/test/resources/json/filter-config.json | 7 | ||||
-rw-r--r-- | src/test/resources/json/nested-document.json | 49 | ||||
-rw-r--r-- | src/test/resources/json/queries/query-with-subrange.json | 14 | ||||
-rw-r--r-- | src/test/resources/json/queries/simple-parsed-query.json | 10 | ||||
-rw-r--r-- | src/test/resources/json/simpleDocument.json | 17 | ||||
-rw-r--r-- | src/test/resources/json/tier-support-document.json | 30 |
9 files changed, 211 insertions, 0 deletions
diff --git a/src/test/resources/json/analysis-config.json b/src/test/resources/json/analysis-config.json new file mode 100644 index 0000000..a622dcf --- /dev/null +++ b/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/src/test/resources/json/bulk-ops-invalid.json b/src/test/resources/json/bulk-ops-invalid.json new file mode 100644 index 0000000..4708498 --- /dev/null +++ b/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/src/test/resources/json/bulk-ops-valid.json b/src/test/resources/json/bulk-ops-valid.json new file mode 100644 index 0000000..6e805cf --- /dev/null +++ b/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/src/test/resources/json/filter-config.json b/src/test/resources/json/filter-config.json new file mode 100644 index 0000000..d1de1d7 --- /dev/null +++ b/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/src/test/resources/json/nested-document.json b/src/test/resources/json/nested-document.json new file mode 100644 index 0000000..8373a6d --- /dev/null +++ b/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/src/test/resources/json/queries/query-with-subrange.json b/src/test/resources/json/queries/query-with-subrange.json new file mode 100644 index 0000000..36e5f15 --- /dev/null +++ b/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/src/test/resources/json/queries/simple-parsed-query.json b/src/test/resources/json/queries/simple-parsed-query.json new file mode 100644 index 0000000..50ce681 --- /dev/null +++ b/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/src/test/resources/json/simpleDocument.json b/src/test/resources/json/simpleDocument.json new file mode 100644 index 0000000..c21c574 --- /dev/null +++ b/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/src/test/resources/json/tier-support-document.json b/src/test/resources/json/tier-support-document.json new file mode 100644 index 0000000..c6a20db --- /dev/null +++ b/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 |