-##### Delete Index
- Method : DELETE
- URL : http://<host>:9509/services/search-data-service/v1/search/indexes/<index>/
- URL Params : index - The name of the index to be deleted.
- Request Payload:
- None
-
-
-### Documents
-
-##### Create Document Without Specifying a Document Identifier
-Documents can be created via a POST request with no document identifier specified. In this case the document store will generate an identifier to associate with the document.
-
- Method : POST
- URL : https://<host>:9509/services/search-data-service/v1/search/indexes/<index>/documents/
- URL Params : index - The name of the index to create the document in.
- Request Payload:
- Document contents expressed as a JSON object containing key/value pairs.
-
- Response Payload:
- { "etag": "string", "url": "string" }
-
-##### Create or Update Document With a Specified Document Identifier
-Documents can also be created via a PUT request which includes an identifier to associate with the document. The put endpoint is actually used for both creates and updates, where this is distinguished as follows:
-* If the request header DOES NOT include a value in the If-Match field, then the request is assumed to be a document create.
-* If the request header DOES contain a value in the If-Match field, then the request is assumed to be a document update.
-
- Method : PUT
- URL : https://<host>:9509/services/search-data-service/v1/search/indexes/<index>/documents<document id>
- URL Params : index - The name of the index to create or update the document in.
- document id - The identifier of the document to be created or updated.
- Request Payload:
- Document contents expressed as a JSON object containing key/value pairs.
-
- Response Payload:
- { "etag": "string", "url": "string"}
-
-##### Delete a Document
-
- Method: : DELETE
- URL : https://<host>:9509/services/search-data-service/v1/search/indexes/<index>/documents<document id>
- URL Params : index - The name of the index to remove the document from.
- document id - the identifier of the document to be deleted.
- Request Payload:
- None.
-
-##### Retrieve a Document
-
- Method: : GET
- URL : https://<host>:9509/services/search-data-service/v1/search/indexes/<index>/documents<document id>
- URL Params : index - The name of the index to retrieve the document from.
- document id - the identifier of the document to be retrieved.
- Request Payload:
- None.
-
-
-### Searching the Document Store
-Search statements are passed to the _Search Data Service_ as a JSON object which is structured as follows:
-
-_Filters_
-* A "filter" stanza defines a set of queries to be run in _non-scoring-mode_ to reduce the document set to a smaller subset to be searched.
-* The filter stanza is optional - omitting it implies that the query is _unfiltered_.
-* This stanza is represented as a JSON object with the following structure:
-
- "filter": {
- "all": [ { query }, { query },....{ query }],
- "any": [ { query }, { query },....{ query }]
- },
-
-Where:
-* the _all_ list defines a set of queryies such that ALL queries in the list must be satisfied for the document to pass the filter.
-* the _any_ list defines a set of queryies such that ANY single query in the list must be satisfied for the document to pass the filter.
-
-_Queries_
-The following types of query statements are supported by the _Search Data Service_:
-
-_Term Query_:
-
-A term query attempts to match the literal value of a field, with no advanced parsing or analysis of the query string. This type of query is most appropriate for structured data like numbers, dates and enums, rather than full text fields.
-
- // Find documents where the specified field contains the supplied value
- "match": {
- "field": "value"
- }
-
- // Find documents where the specified field DOES NOT contain the supplied value
- "not-match": {
- "field": "value"
- }