Overview

The Search service is deprecated. New subscriptions are unavailable. The service is available for existing subscribers only until July 1st, 2017.

This service provides Elasticsearch functionality, including:

  • Advanced search functionality (full text search, search ahead, filtering by terms and ranges)
  • Data analytics
  • Data separation
  • CRUD operation on documents, including versioning

For more information about Search service best practices, see Best Practices. For more information about Search service limitations, see Limitations.


API Reference

/{tenant}/{client}

/{tenant}/{client}

post

The index operation automatically creates an index if it has not been created already (see the create index API for manually creating an index), and also automatically creates a dynamic type mapping for the specific type if one has not yet been created (see the put mapping API for manually creating a type mapping).

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

put

The create index API enables you to instantiate an index. Elasticsearch provides support for multiple indices, including executing operations across several indices.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

delete

The delete index API enables you to delete an existing index.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

get

Used to retrieve the index (or indices) definition.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

head

Used to check whether or not the index (or indices) exists. For example: curl -XHEAD 'http://localhost:9200/twitter'

The HTTP status code indicates whether or not the index exists. A status code of 404 means it does not exist, and 200 means it does.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/{type}

post

The index operation can be executed without specifying the ID. In such a case, an ID will be generated automatically. In addition, the op_type will automatically be set to create. Following is an example (note the POST used instead of PUT).

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

head

Used to check if a type (or types) exists in an index (or indices). The HTTP status code indicates whether or not the type exists. A status code of 404 means it does not exist, and 200 means it does.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

delete

Enables you to delete a mapping (type) along with its data.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/{type}/{id}

get

The get API enables you to get a typed JSON document from the index based on its ID.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

put

The index API adds or updates a typed JSON document in a specific index, making it searchable.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

head

The API also enables you to check for the existence of a document using HEAD.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

delete

The delete API enables you to delete a typed JSON document from a specific index based on its ID.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/{type}/{id}/_create

put

This is an example of using the option to specify create.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/{type}/{id}/_source

get

Use the endpoint to get just the _source field of the document, without any additional content around it.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

head

There is also a HEAD variant for the _source endpoint to efficiently test for document existence.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/{type}/{id}/_mlt

The API executes a search request with a More Like This Query (MLT Query) (http parameters match the parameters to the more_like_this query). This means that the body of the request can optionally include all of the request body options in the search API (aggs, from/to, and so on). Internally, the more like this API is equivalent to performing a Boolean query of more_like_this_field queries, with one query per specified mlt_fields.

Rest parameters relating to search are also allowed, including search_type, search_indices, search_types, search_scroll, search_size and search_from.

When no mlt_fields are specified, all of the fields of the document are used in the more_like_this query that is generated.

By default, the queried document is excluded from the response (include set to false).

Note: In order to use the MLT feature, an mlt_field needs to be either stored, store term_vector, or source needs to be enabled.

get

The more like this (mlt) API enables you to get documents that are "like" a specified document.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/{type}/{id}/_termvector

get

Returns information and statistics on terms in the fields of a particular document as stored in the index.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/{type}/_bulk

post

The bulk API makes it possible to perform many index/delete operations in a single API call. This can greatly increase the indexing speed.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/{type}/_query

delete

The delete by query API enables you to delete documents from one or more indices and one or more types based on a query. The query can either be provided using a simple query string as a parameter or using the Query DSL defined within the request body.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/{type}/_count

get

The count API enables you to easily execute a query and get the number of matches for that query.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/{type}/_mapping

put

The put mapping API enables you to register specific mapping definition for a specific type.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

delete

This enables you to delete a mapping (type) along with its data.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/{type}/_mapping/field/{fields}

get



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/{type}/_warmer/{warmer}

get



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

put



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/{type}/_mtermvectors

get

The multi termvectors API enables you to get multiple termvectors based on an index, type, and ID. The response includes a docs array with all the fetched termvectors, with each element having the structure provided by the termvectors API.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/{type}/_mget

get

The multi GET API enables you to get multiple documents based on an index, type (optional), and id (and possibly routing). The response includes a docs array with all the fetched documents, each element similar in structure to a document provided by the get API.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/{type}/_validate/query

get

The validate API enables you to validate a potentially expensive query without executing it.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/{type}/_msearch

get

The multi search API enables you to execute several search requests within the same API.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

post

The multi search API enables you to execute several search requests within the same API.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_bulk

post

The bulk API enables you to perform many index/delete operations in a single API call. This can greatly increase the indexing speed.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_query

delete

The delete by query API enables you to delete documents from one or more indices and one or more types based on a query. The query can either be provided using a simple query string as a parameter or using the Query DSL defined within the request body.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_search_shards

The search shards API returns the indices and shards that a search request would be executed against. This can give useful feedback for working out issues or planning optimizations with routing and shard preferences.

get



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_count

get

The count API enables you to easily execute a query and get the number of matches for that query.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_open

The open and close index APIs enable you to close an index and then open it later. A closed index has almost no overhead on the cluster (except for maintaining its metadata) and is blocked for read/write operations. A closed index can be opened, which then goes through the normal recovery process.

post



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_close

The open and close index APIs enable you to close an index and then open it later. A closed index has almost no overhead on the cluster (except for maintaining its metadata) and is blocked for read/write operations. A closed index can be opened, which then goes through the normal recovery process.

post



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_mapping

get



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_mapping/{types}

get

Enables you to delete a mapping (type) along with its data.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

put



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

delete



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_mapping/{types}/{fields}

get



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_settings

get

Retrieve settings of index or indices.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

put

Enables you to control the allocation of indices on nodes based on include/exclude filters. The filters can be set both on the index level and on the cluster level. This example is of setting it on the cluster level. You can create an index that only deploys on nodes that have tag set to value1 and value2 by setting index.routing.allocation.include.tag to value1,value2.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_analyze

get

Performs the analysis process on a text and return the token's breakdown of the text.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_warmer/{warmerName}

get



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

put



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_warmers/{warmerName}

get



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

put



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_status

The indices status API enables you to get comprehensive status information of one or more indices.

get



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_stats

Indices level stats provide statistics on different operations happening on an index. The API provides statistics on the index level scope (although most stats can also be retrieved using node level scope).

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

get



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_stats/{statSpec}

get



Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_segments

get

Provide low level segments information with which a Lucene index (shard level) is built. Can be used to provide more information on the state of a shard and an index, such as optimization information, data "wasted" on deletes, and so on.'

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_recovery

get

The indices recovery API provides insight into ongoing index shard recoveries. Recovery status may be reported for specific indices or cluster-wide.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_cache/clear

post

The clear cache API enables you to clear either all caches or specific caches associated with one ore more indices.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_flush

post

The flush API enables you to flush one or more indices through an API. The flush process of an index frees memory from the index by flushing data to the index storage and clearing the internal transaction log. By default, Elasticsearch uses memory heuristics to automatically trigger flush operations as required in order to clear memory.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_refresh

post

The refresh API enables you to explicitly refresh one or more index, making all operations performed since the last refresh available for search. The (near) real-time capabilities depend on the index engine used. For example, the internal one requires refresh to be called, but by default a refresh is scheduled periodically.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_optimize

post

The optimize API enables you to optimize one or more indices through an API. The optimize process optimizes the index for faster search operations and relates to the number of segments a Lucene index holds within each shard. The optimize operation enables you to reduce the number of segments by merging them.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.

/{tenant}/{client}/_mtermvectors

get

The multi termvectors API enables you to get multiple termvectors based on an index, type, and ID. The response includes a docs array with all the fetched termvectors, with each element having the structure provided by the termvectors API.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_mget

get

The multi GET API enables you to get multiple documents based on an index, type (optional), and id (and possibly routing). The response includes a docs array with all the fetched documents, each element similar in structure to a document provided by the get API.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_validate/query

get

The validate API enables you to validate a potentially expensive query without executing it.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

/{tenant}/{client}/_msearch

get

The multi search API enables you to execute several search requests within the same API.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_view scope to manage this resource.

post

The multi search API enables you to execute several search requests within the same API.

Security / Access Control:
To access this method, access token must be issued for tenant and client and have hybris.search_manage scope to manage this resource.


Security

The Search service is a container for your data. You control the data stored in the Search service, and only you know whether the document contains personal data and which data subject the data relates to. Therefore, to meet the data privacy requirements, you must map documents containing personal data to corresponding data subjects, and implement a logic to serve the data subject's requests related to its personal data, such as requests for information or deletion. To meet these goals, follow the instructions provided in the Developer Guidelines for Data Privacy.


Scopes

The Search service requires scopes for viewing and managing data. All operations with a GET method require hybris.search_view scope. All operations with a POST, PUT, or DELETE method require the hybris.search_manage scope. The only exception is an operation with a POST method and with a path structure of /*/*/_search or /*/*/*/_search that requires the hybris.search_view scope instead of hybris.search_manage. These scopes should be granted in an access token received from the OAuth 2.0 service. You can find more information about scopes and access tokens in the following documents:


Best Practices

Use analyzers to avoid issues with queries

The Search service is backed by Elasticsearch and offers full text search and matching. To make it work efficiently, fields are set to be analyzed by default. When a field is set as analyzed, Elasticsearch applies tokenization of strings for full text search.

Such fields do not work properly with queries using terms and/or filters. For such fields, you need to set the field to not-analyzed.

The following example demonstrates how to define fields to be not_analyzed for type books.

  • Method: PUT
  • Request URL: https://api.beta.yaas.io/hybris/search/v1/{tenant}/{client}/_mappings/books
  • URI parameters:
    • Required:
      • tenant: The project that requests this resource. Must match the project that is associated with the access token in the Authorization header.
    • client: The name of the client.
  • Body:
    {
      "books": {
          "properties" : {
              "english_title": {
                  "type":     "string",
                  "analyzer": "english"
              },
              "tags" : {
                  "type" : "string",
                  "index" : "not_analyzed"
              },
              "status" : {
                  "type" : "string",
                  "index" : "not_analyzed"
              }
          }
      }
    }
    

In the following example, the field english_title is defined to be analyzed using the English analyzer, and the fields tags and status are set to be not analyzed.

  • Method: POST
  • Request URL: https://api.beta.yaas.io/hybris/search/v1/{tenant}/{client}/books/_search
  • URI parameters:
    • Required:
      • tenant: The project that requests this resource. Must match the project that is associated with the access token in the Authorization header.
    • client: The name of the client.
  • Body:

    {
      "query": {
         "filtered": {
             "query" : {
                  "bool" : {
                      "must" : [
                          { "term" : {"status": "ACTIVE"}},
                          { "term" : {"tags": "horror"}}
                      ]
                  }
    
             }
          }
      }
    }
    

By default, Elasticsearch applies the standard analyzer for all string fields.

For more information about analyzers in Elasticsearch, see Analyzers and Configuring Analyzers in the Elasticsearch documentation.

Once a type or field mapping is set to analyzed or not_analyzed, it cannot be changed. You can still extend mapping by adding new fields, but you cannot change fields that are already indexed.

Count your documents

You can count your documents by query using the _count endpoint.

  • Method: POST
  • Request URL: https://api.beta.yaas.io/hybris/search/v1/{tenant}/{client}/books/_count
  • URI parameters:
    • Required:
      • tenant: The project that requests this resource. Must match the project that is associated with the access token in the Authorization header.
    • client: The name of the client.
  • Body:

    {
      "query": {
         "filtered": {
             "query" : {
                  "bool" : {
                      "must" : [
                          { "term" : {"status": "ACTIVE"}},
                          { "term" : {"tags": "horror"}}
                      ]
                  }
    
             }
          }
      }
    }
    

Use aggregation for analytics

The Search service can be used for aggregations that you can use for your data analytics. The following example demonstrates how to calculate an average price:

  • Method: POST
  • Request URL: https://api.beta.yaas.io/hybris/search/v1/{tenant}/{client}/books/_search
  • URI parameters:
    • Required:
      • tenant: The project that requests this resource. Must match the project that is associated with the access token in the Authorization header.
    • client: The name of the client.
  • Body:

    {
      "size" : 0,
      "query": {
         "filtered": {
             "query" : {
                  "bool" : {
                      "must" : [
                          { "term" : {"status": "ACTIVE"}}
                      ]^
                  }
    
             }
          }
      },
      "aggs" : {
          "avg_prive" : { "avg" : { "field" : "price" } }
      }
    }
    
The field size is set to 0, which means that the aggregation result will be returned without the documents matched by query.

Use analyzer to check how text is being processed

The Search service enables you to check how fields are being analyzed using the _analyze endpoint, which reveals how text is being tokenized.

In these calls, the body must be provided as plain text.
  • Method: POST
  • Request URL: https://api.beta.yaas.io/hybris/search/v1/{tenant}/{client}/_analyze?analyzer=english
  • URI parameters:
    • Required:
      • tenant: The project that requests this resource. Must match the project that is associated with the access token in the Authorization header.
    • client: The name of the client.
  • Body:
    This is the text that will be analyzed
    
    For more examples of how to use the _analyze endpoint, see Analyze in the Elasticsearch documentation.

For more information about Elasticsearch, see the Elasticsearch documentation.


Limitations

Implicit index creation - one index per tenant

The index name is a combination of your {tenant} and {client} names. This way, there is only one index available for each {tenant} and {client} pair, and it is created automatically with the first call to the Search service.

Index and tenant - data separation

The Search service separates data by {tenant} and {client}, which are combined to create the index name. There must be a valid {tenant} and {client} passed to the Search service through the path parameters {tenant} and {client}.

Passing an index in a query to the Search service

The Search service gets the index name from {tenant} and {client} passed in URL. You cannot pass explicit index name in a request body.

  • You cannot use any kind of scripts for Elasticsearch in the Search service. Therefore, the _update operation is disabled.
  • You cannot create index aliases in the Search service. Therefore, _alias operation is disabled.


Introduction

Tutorials for the Search service are based on the following scenario:

  • The {tenant} in the example is a bookstore.
  • The {client} in the example is called mycomicsstore.
  • You have a bookstore and create online catalog for it.
  • The bookstore can have many types of books in its catalog, such as comic books.
  • This tutorial demonstrates how to search for these books using the Search service.
Remember to replace {tenant} with your Project ID and {client} with your YaaS Client. YaaS Client can be obtained from service definition in builder.


Perform Simple Operations on Index

Get all your variables in one place

The following variables are used within this tutorial:

tenant = {{projectId}};
client = {{clientName}};
AccessToken = {{token}};

Create API client for Search service

API.createClient('searchService',
'/services/search/latest/api.raml');

Create index with mapping

Request

  • Method: POST
  • Request URL: https://api.beta.yaas.io/hybris/search/v1/{tenant}/{client}
  • URI parameters:
    • Required:
      • tenant: The project that requests this resource. Must match the project that is associated with the access token in the Authorization header.
    • client: The name of the client.
  • Response:
    • Status code: 200
searchService.tenant(tenant).client(client).post(
  {
    "settings" : {
      "index" : {
        "mapping.allow_type_wrapper" : true
      }
    }
  },
  {
    headers: {
      'Authorization': 'Bearer ' + AccessToken
    }
  }).body

Retrieve index definition

Request

  • Method: GET
  • Request URL: https://api.beta.yaas.io/hybris/search/v1/{tenant}/{client}
  • URI parameters:
    • Required:
      • tenant: The project that requests this resource. Must match the project that is associated with the access token in the Authorization header.
    • client: The name of the client.
  • Response:
    • Status code: 200
searchService.tenant(tenant).client(client).get(null,
  {
    headers: {
      'Authorization': 'Bearer ' + AccessToken
    }
  }).body


Perform Operations on Documents

Get all your variables in one place

The following variables are used within this tutorial:

tenant = {{projectId}};
client = {{clientName}};
AccessToken = {{token}};

Create API client for Search service

API.createClient('searchService',
'/services/search/latest/api.raml');

Insert documents into an index

Request

  • Method: PUT
  • Request URL: https://api.beta.yaas.io/hybris/search/v1/{tenant}/{client}/{type}/{id}
  • URI parameters:
    • Required:
      • tenant: The project that requests this resource. Must match the project that is associated with the access token in the Authorization header.
    • client: The name of the YaaS client.
    • type: The type of the resource, like books.
    • id: The id of the resource to be inserted. For example, comic1.
    • client: The name of the client.
  • Response:
    • Status code: 200
comic_obj1 = searchService.tenant(tenant).client(client).type('books').id('comic1').put(
  {
    "name": "Thorgal",
    "title": "The Three Elders of Aran",
    "price": 15.99,
    "cover": "hardcover",
    "type": "comic book"
  },
  {
    headers: {
      'Authorization': 'Bearer ' + AccessToken
    }
  }).body
comic_obj2 = searchService.tenant(tenant).client(client).type('books').id('comic1').put(
  {
    "name": "Thorgal",
    "title": "The Three Elders of Aran",
    "price": 15.99,
    "cover": "hardcover",
    "type": "comic book"
  },
  {
    headers: {
      'Authorization': 'Bearer ' + AccessToken
    }
  }).body

Search documents with a query

Request

  • Method: POST
  • Request URL: https://api.beta.yaas.io/hybris/search/v1/{tenant}/{client}/{_type}/_search
  • URI parameters:
    • Required:
      • tenant: The project that requests this resource. Must match the project that is associated with the access token in the Authorization header.
    • client: The name of the client.
    • _type: The type of the resource, like books.
  • Query parameters:
  • Response:
    • Status code: 200
searchService.tenant(tenant).client(client).type('books')._search.post(null,
  {
    headers: {
      'Authorization': 'Bearer ' + AccessToken,
      'Content-type' : 'application/json'
    },
    query: {"match":
    {"_all":"Elders"}
  }
}).body


Further information

The Search service is backed by Elasticsearch. For more information about all of the search possibilities with Elasticsearch, see the Elasticsearch documentation.

Elasticsearch does not guarantee full persistence of the data, therefore the Search service, which is built on top of it, should not be used as a primary data storage.
The following links point to the newest Elasticsearch documentation. However, the Search service may not always be connected to the newest version. To check which version of Elasticsearch version is currently connected to the Search service, see the Search service release notes.

Having a solid understanding of Elasticsearch query theory enables you to benefit fully from the rich functionality of the Search service and use it effectively.


Security

The Search service is a container for your data. You control the data stored in the Search service, and only you know whether the document contains personal data and which data subject the data relates to. Therefore, to meet the data privacy requirements, you must map documents containing personal data to corresponding data subjects, and implement a logic to serve the data subject's requests related to its personal data, such as requests for information or deletion. To meet these goals, follow the instructions provided in the Developer Guidelines for Data Privacy.


  • Send feedback

    If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.

  • Get Help

    Use our private help channel. Receive updates over email and contact our specialists directly.

  • hybris Experts

    If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.