Skip to content

ecomclub/search-api-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Samples of items search

Pages

  1. Samples of items search

Summary

  1. Introduction
  2. Search body examples

{% raw %}

Introduction

This document is intended to provide examples of Request Body Search (Elasticsearch), for faster and flexible products searches within E-Com Plus Search API.

You should use the examples below as request body of Items Complex Search reference.

Search by brands

{
  "query": {
    "bool": {
      "filter": [
        {
          "terms": {
            "brands.name": [ "BRAND_NAME" ]
          }
        }
      ]
    }
  }
}

Search by brands and categories

{
  "query": {
    "bool": {
      "filter": [
        {
          "terms": {
            "brands.name": [ "BRAND1", "BRAND2", "BRAND3" ]
          }
        },
        {
          "terms": {
            "categories.name": [ "CATEGORY_NAME" ]
          }
        }
      ]
    }
  }
}

{% endraw %}

About

Examples of request body to E-Com Plus Search API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages