# Search

Search endpoint allows you to make full text search and use faceted search.

# Search

# Query

Variable Type Description Default value
query String Query string
page Integer Number of page in pagination 1
per_page Integer Amount of items on one page 10
filters Object Object with facet values for filtering
not_filters Object Object with facet values for negative filtering
facet_fields [Strings] List of facets fields for calculation and returns
sort_field String By which fields the results should be sorted
order String sorting by asc or desc

# Response

field Description type
pagination Pagination information Object
data.items List of items Array
data.aggregations Facet distribution (facets values and counts) Object
timings The various times for calculating request Object

# Example

# Response: 200 Ok

{
  "pagination": {
    "per_page": 2,
    "page": 1,
    "total": 1000
  },
  "timings": {
    "total": 13,
    "sort": 0,
    "facets": 9,
    "search": 0,
    "sorting": 0
  },
  "data": {
    "items": [
      {
        "name": "The Shawshank Redemption",
        "year": 1994,
        "rating": 9.3,
        "votes": 1790841,
        "description": "Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.",
        "storyline": "Chronicles the experiences of a formerly successful banker as a prisoner in the gloomy jailhouse of Shawshank after being found guilty of a crime he did not commit. The film portrays the man's unique way of dealing with his new, torturous life; along the way he befriends a number of fellow prisoners, most notably a wise long-term inmate named Red. Written by J-S-Golden",
        "director": [
          "Frank Darabont"
        ],
        "runtime": 142,
        "reviews_count": 4446
      },
      ...
    ],
    "aggregations": {
      "country": {
        "buckets": [
          {
            "key": "USA",
            "doc_count": 704,
            "selected": false
          },
          {
            "key": "UK",
            "doc_count": 180,
            "selected": false
          },
          {
            "key": "France",
            "doc_count": 120,
            "selected": false
          }
        ]
      },
      ...
    }
  }
}

# Facet

# Query

Variable Type Description Default value
name String Facet field name (mandatory)
page Integer Number of buckets in pagination 1
per_page Integer Amount of buckets on one page 10

# Response

field Description type
pagination Pagination information Object
data.buckets List of faceted buckets Array

# Example

# Response: 200 Ok

{
  "pagination": {
    "per_page": 10,
    "page": 1,
    "total": 55
  },
  "data": {
    "buckets": [
      {
        "key": "USA",
        "doc_count": 704,
        "selected": false
      },
      {
        "key": "UK",
        "doc_count": 180,
        "selected": false
      },
      {
        "key": "France",
        "doc_count": 120,
        "selected": false
      },
      ...
    ]
  }
}