Search Parameters

Search parameters let the user customize their search request.

Query ParameterDescriptionDefault Value
qQuery string“”
offsetNumber of documents to skip0
limitMaximum number of documents returned20
filtersFilter queries by an attribute valuenull
facetFiltersFacet names and values to filter onnull
facetsDistributionFacets for which to retrieve the matching countnull
attributesToRetrieveAttributes to display in the returned documents[“*”]
attributesToCropAttributes whose values have to be croppednull
cropLengthLength used to crop field values200
attributesToHighlightAttributes whose values will contain highlighted matching termsnull
matchesDefines whether an object that contains information about the matches should be returned or notfalse

Query (q)

This is the string used by the search engine to find relevant documents. Search queries are tokenized.

WARNING

MeiliSearch only considers the first ten words of any given search query. This is necessary in order to deliver a fast type-as-you-search experience in a consistent way.

q=<String>

  • <String> (String)

    The query string.

Example

Suppose you would like to search shifu in a movie database. You would send the following:

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "shifu" }'
  1. client.index('movies').search('shifu')
  1. client.index('movies').search('shifu')
  1. $client->index('movies')->search('shifu');
  1. index.search('shifu')
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "shifu",
  3. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("shifu")
  3. .execute()
  4. .await
  5. .unwrap();

Placeholder Search

When q isn’t specified, a placeholder search is performed. Placeholder search allows you to find documents without providing any search terms.

Placeholder search returns the documents that best match other search parameters, sorted according to that index’s ranking rules. This feature also supports faceting and filtering

Offset

A number of documents to skip.

offset=<Integer>

  • <Integer> (Optional, positive integer, defaults to 0)

    If the value of the parameter offset is n, n first documents to skip. This is helpful for pagination.

Example

If you want to skip the first document, set offset to 1.

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "shifu", "offset": 1 }'
  1. client.index('movies').search('shifu', {
  2. offset: 1
  3. })
  1. client.index('movies').search('shifu', {
  2. 'offset': 1
  3. })
  1. $client->index('movies')->search('shifu', ['offset' => 1]);
  1. index.search('shifu', {
  2. offset: 1
  3. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "shifu",
  3. Offset: 1,
  4. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("shifu")
  3. .with_offset(1)
  4. .execute()
  5. .await
  6. .unwrap();

Limit

Set a limit to the number of documents returned by search queries.

limit=<Integer>

  • <Integer> (Optional, positive integer, defaults to 20)

    If the value of the parameter limit is n, there will be n documents in the search query response. This is helpful for pagination.

Example

If you want to get only two documents, set limit to 2.

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "shifu", "limit": 2 }'
  1. client.index('movies').search('shifu', {
  2. limit: 2
  3. })
  1. client.index('movies').search('shifu', {
  2. 'limit': 2
  3. })
  1. $client->index('movies')->search('shifu', ['limit' => 1]);
  1. index.search('shifu', {
  2. limit: 2
  3. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "shifu",
  3. Limit: 2,
  4. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("shifu")
  3. .with_limit(2)
  4. .execute()
  5. .await
  6. .unwrap();

Filters

filters=<String>

Specify a filter to be used with the query. See our dedicated guide.

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "n", "filters": "title = Nightshift" }'
  1. client.index('movies').search('n', {
  2. filters: 'title = Nightshift'
  3. })
  1. client.index('movies').search('n', {
  2. 'filters': 'title = Nightshift'
  3. })
  1. $client->index('movies')->search('n', ['filters' => 'title = Nightshift']);
  1. index.search('n', {
  2. filters: 'title = Nightshift'
  3. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "n",
  3. Filters: "title = Nightshift",
  4. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("n")
  3. .with_filters("title = Nightshift")
  4. .execute()
  5. .await
  6. .unwrap();
  1. {
  2. "id": "569367",
  3. "title": "Nightshift",
  4. "poster": "https://image.tmdb.org/t/p/w1280/peOeFl8ZTBTCERz5XQZAjYbXYsQ.jpg",
  5. "overview": "Amy begins her first night shift in a hotel with a murderous past. Witnessing terrifying events and trapped within a loop, Amy must find a way to escape the flesh obsessed murderer and save residents of the hotel.",
  6. "release_date": 1536282000
  7. }

The parameter should be URL-encoded.

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "shifu", "filters": "title=\"Kung Fu Panda\"" }'
  1. client.index('movies').search('n', {
  2. filters: 'title="Kung Fu Panda"'
  3. })
  1. client.index('movies').search('n', {
  2. 'filters': 'title = "Kung Fu Panda"'
  3. })
  1. $client->index('movies')->search('shifu', ['filters' => 'title="Kung Fu Panda"']);
  1. index.search('n', {
  2. filters: 'title="Kung Fu Panda"'
  3. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "n",
  3. Filters: "title=\"Kung Fu Panda\"",
  4. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("n")
  3. .with_filters(r#"title = "Kung Fu Panda""#)
  4. .execute()
  5. .await
  6. .unwrap();

Facet filters

If you have set up faceted attributes, you can filter on facets to narrow down your results based on criteria.

facetFilters=["facetName:facetValue"] or facetFilters=[["facetName:facetValue"]]
or a mix of both facetFilters=["facetName1:facetValue1", ["facetName2:facetValue2"]]

  • ["facetName1:facetValue1", ["facetName2:facetValue2"]] (Array of array of strings or single strings, defaults to null)

    Both types of array contain the facet names and values to filter on.
    A valid array must be an array that contains either a list of strings or arrays of strings and can mix both (e.g. ["director:Mati Diop", ["genres:Comedy", "genres:Romance"]]).

    • facetName: The name (the attribute) of a field used as a facet (e.g. director, genres).
    • facetValue: The value of this facet to filter results on (e.g. Tim Burton, Mati Diop, Comedy, Romance).

Facet filters also support logical connectives by using inner and outer array elements.

Learn more about facet filters in the dedicated guide

Example

Suppose you have declared director and genres as faceted attributes, and you want to get movies matching “thriller” classified as either horror or mystery and directed by Jordan Peele.

  1. ("genres:Horror" OR "genres:Mystery") AND "director:Jordan Peele"

Querying on “thriller”, the above example results in the following CURL command:

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "thriller", "facetFilters": [["genres:Horror", "genres:Mystery"], "director:Jordan Peele"] }'
  1. client.index('movies')
  2. .search('thriller', {
  3. facetFilters: [['genres:Horror', 'genres:Mystery'], 'director:Jordan Peele']
  4. })
  1. client.index('movies').search('thriller', {
  2. 'facetFilters': [['genres:Horror', 'genres:Mystery'], 'director:Jordan Peele']
  3. })
  1. $client->index('movies')->search('thriller', ['facetFilters' => [['genres:Horror', 'genres:Mystery']], 'director' => "Jordan Peele"]);
  1. index.search('thriller', {
  2. facetFilters: [['genres:Horror', 'genres:Mystery'], 'director:Jordan Peele']
  3. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "thriller",
  3. FacetFilters: [][]string{
  4. []string{"genres:Horror", "genres:Mystery"},
  5. []string{"director:Jordan Peele"},
  6. },
  7. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("thriller")
  3. .with_facet_filters(&[&["genres:Horror", "genres:Mystery"], &["director:Jordan Peele"]])
  4. .execute()
  5. .await
  6. .unwrap();

And you would get the following response:

  1. {
  2. "hits": [
  3. {
  4. "id": 458723,
  5. "title": "Us",
  6. "director": "Jordan Peele",
  7. "tagline": "Watch yourself",
  8. "genres": [
  9. "Thriller",
  10. "Horror",
  11. "Mystery"
  12. ],
  13. "overview": "Husband and wife Gabe and Adelaide Wilson take their kids to their beach house expecting to unplug and unwind with friends. But as night descends, their serenity turns to tension and chaos when some shocking visitors arrive uninvited.",
  14. },
  15. {
  16. "id": 419430,
  17. "title": "Get Out",
  18. "director": "Jordan Peele",
  19. "genres": [
  20. "Mystery",
  21. "Thriller",
  22. "Horror"
  23. ],
  24. "overview": "Chris and his girlfriend Rose go upstate to visit her parents for the weekend. At first, Chris reads the family's overly accommodating behavior as nervous attempts to deal with their daughter's interracial relationship, but as the weekend progresses, a series of increasingly disturbing discoveries lead him to a truth that he never could have imagined.",
  25. }
  26. ],
  27. ...
  28. "query": "thriller"
  29. }

The facets distribution

If you have set up faceted attributes, you can retrieve the count of matching terms for each facets.

facetsDistribution=[<facetName>, <facetName>, ...]

This attribute can take two values:

  • [<facetName>, <facetName>, ...] (Array of strings)

    An array of strings that contains the facets for which to retrieve the matching count. The number of remaining candidates for each specified facet is returned.
    If a facet name doesn’t exist, it will be ignored.

  • ["*"]

    In that case, a count for all facets is returned.

Returned fields

If the facetsDistribution parameter has been set, the returned results will contain two additional fields:

  • facetsDistribution: The number of remaining candidates for each specified facet.

  • exhaustiveFacetsCount:
    Returns true if the count in each facet value is exhaustive (exact count for each facet value).
    Otherwise, returns false if this count is approximative (approximative count for each facet value).
    The approximative facet count happens when there are too many documents in too many different facet values. In which case, MeiliSearch stops the distribution count to prevent considerably slowing down the request.

Learn more about facet distribution in the dedicated guide

Example

Given a movie database, suppose that you want to know what the number of Batman movies per genre is. You would use the following CURL command:

  1. curl --get 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "Batman", "facetsDistribution": ["genres"] }'
  1. client.index('movies')
  2. .search('Batman', {
  3. facetsDistribution: ['genres']
  4. })
  1. client.index('movies').search('Batman', {
  2. 'facetsDistribution': ['genres']
  3. })
  1. $client->index('movies')->search('Batman', ['facetsDistribution' => ['genres']]);
  1. index.search('Batman', {
  2. facetsDistribution: ['genres']
  3. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "Batman",
  3. FacetsDistribution: []string{
  4. "genres",
  5. },
  6. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("Batman")
  3. .with_facets_distribution(Selectors::Some(&["genres"]))
  4. .execute()
  5. .await
  6. .unwrap();
  7. let genres: &HashMap<String, usize> = results.facets_distribution.unwrap().get("genres").unwrap();

And you would get the following response:

  1. {
  2. "hits": [
  3. ...
  4. ],
  5. ...
  6. "nbHits": 1684,
  7. "query": "Batman",
  8. "exhaustiveFacetsCount": true,
  9. "facetsDistribution": {
  10. "genres": {
  11. "action": 273,
  12. "animation": 118,
  13. "adventure": 132,
  14. "fantasy": 67,
  15. "comedy": 475,
  16. "mystery": 70,
  17. "thriller": 217,
  18. }
  19. }
  20. }

Attributes to Retrieve

Attributes to display in the returned documents.

attributesToRetrieve=<Attribute>,<Attribute>,...

  • <Attribute> (Optional, string, Defaults to ['*'])

    Comma-separated list of attributes whose fields will be present in the returned documents.

    Defaults to to the displayedAttributes list which contains by default all attributes found in the documents.

Example

If you want to get only the overview and title field and not the other fields, set attributesToRetrieve to overview,title.

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "shifu", "attributesToRetrieve": ["overview", "title"] }'
  1. client.index('movies').search('shifu', {
  2. attributesToRetrieve: ['overview', 'title']
  3. })
  1. client.index('movies').search('shifu', {
  2. 'attributesToRetrieve': ['overview', 'title']
  3. })
  1. $client->index('movies')->search('shifu', ['attributesToRetrieve' => ['overview', 'title']]);
  1. index.search('shifu', {
  2. attributesToRetrieve: ['overview', 'title']
  3. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "shifu",
  3. AttributesToRetrieve: []string{"overview", "title"},
  4. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("shifu")
  3. .with_attributes_to_retrieve(Selectors::Some(&["overview", "title"]))
  4. .execute()
  5. .await
  6. .unwrap();

Attributes to Crop

Attributes whose values will be cropped if they contain a matched query word.

attributesToCrop=<Attribute:Croplength>,<Attribute:Croplength>,...

Attribute can have two values:

  • <Attribute> OR <Attribute:Croplength> (Optional, string, defaults to empty)

    Comma-separated list of attributes whose values will be cropped if they contain a matched query word.
    Each attribute can be joined by an optional cropLength that overwrites the cropLength parameter.

  • ['*']

    In this case, all the attributes present in attributesToRetrieve will be assigned to attributesToCrop.

In the case a matched query word is found, the field’s value will be cropped around the first matched query word according to the cropLength value (default 200 see cropLength to change this value).

Some working examples:

  • attributesToCrop=overview
  • attributesToCrop=overview:20
  • attributesToCrop=*,overview:20,title:0

TIP

This is especially useful when you have to display content on the front-end in a specific way.

Cropping start at the first occurrence of the search query. It only keeps cropLength chars on each side of the first match, rounded to match word boundaries.

Example

If you input shifu as a search query and set the value of the parameter cropLength to 10:

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "shifu", "attributesToCrop": ["overview"], "cropLength": 10 }'
  1. client.index('movies').search('shifu', {
  2. attributesToCrop: ['overview'],
  3. cropLength: 10
  4. })
  1. client.index('movies').search('shifu', {
  2. 'attributesToCrop': ['overview'],
  3. 'cropLength': 10
  4. })
  1. $client->index('movies')->search('shifu', ['attributesToCrop' => ['overview'], 'cropLength' => 10]);
  1. index.search('shifu', {
  2. attributesToCrop: ['overview'],
  3. cropLength: 10
  4. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "shifu",
  3. AttributesToCrop: []string{"overview"},
  4. CropLength: 10,
  5. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("shifu")
  3. .with_attributes_to_crop(Selectors::Some(&[("overview", None)]))
  4. .with_crop_length(10)
  5. .execute()
  6. .await
  7. .unwrap();
  8. // Get the formatted results
  9. let formatted_results: Vec<&Movie> = results.hits.iter().map(|r| r.formatted_result.as_ref().unwrap()).collect();

You will get the following response with the cropped version in the _formatted object:

  1. {
  2. "id": "50393",
  3. "title": "Kung Fu Panda Holiday",
  4. "poster": "https://image.tmdb.org/t/p/w1280/gp18R42TbSUlw9VnXFqyecm52lq.jpg",
  5. "overview": "The Winter Feast is Po's favorite holiday. Every year he and his father hang decorations, cook together, and serve noodle soup to the villagers. But this year Shifu informs Po that as Dragon Warrior, it is his duty to host the formal Winter Feast at the Jade Palace. Po is caught between his obligations as the Dragon Warrior and his family traditions: between Shifu and Mr. Ping.",
  6. "release_date": 1290729600,
  7. "_formatted": {
  8. "id": "50393",
  9. "title": "Kung Fu Panda Holiday",
  10. "poster": "https://image.tmdb.org/t/p/w1280/gp18R42TbSUlw9VnXFqyecm52lq.jpg",
  11. "overview": "this year Shifu informs",
  12. "release_date": 1290729600
  13. }
  14. }

Crop Length

cropLength=<Integer> (Optional, positive integer, defaults to 200)

Number of characters to keep on each side of the start of the matching word. See attributesToCrop.

Attributes to Highlight

Attributes whose values will contain highlighted matching query words.

  • attributesToHighlight=[<Attribute>,<Attribute>,...]

Attribute can have two values:

  • <Attribute> (Optional, string, defaults to empty)

    Comma-separated list of attributes. Every matching query words in the given attribute field will be wrapped around an <em> tag.

  • "*"

    In this case, all the attributes present in attributesToRetrieve will be assigned to attributesToHighlight.

Every matching string sequence in the given attribute’s field will be wrapped around an <em> tag.

Some working examples:

  • attributesToHighlight=overview
  • attributesToHighlight=*,overview

Example

If you choose to highlight the content of overview:

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "shifu", "attributesToHighlight": ["overview"] }'
  1. client.index('movies').search('shifu', {
  2. attributesToHighlight: ['overview']
  3. })
  1. client.index('movies').search('shifu', {
  2. 'attributesToHighlight': ['overview']
  3. })
  1. $client->index('movies')->search('shifu', ['attributesToHighlight' => ['overview']]);
  1. index.search('shifu', {
  2. attributesToHighlight: ['overview']
  3. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "shifu",
  3. AttributesToHighlight: []string{"overview"},
  4. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("shifu")
  3. .with_attributes_to_highlight(Selectors::Some(&["overview"]))
  4. .execute()
  5. .await
  6. .unwrap();
  7. // Get the formatted results
  8. let formatted_results: Vec<&Movie> = results.hits.iter().map(|r| r.formatted_result.as_ref().unwrap()).collect();

You will get the following response with the highlighted version in the _formatted object:

  1. {
  2. "id": "50393",
  3. "title": "Kung Fu Panda Holiday",
  4. "poster": "https://image.tmdb.org/t/p/w1280/gp18R42TbSUlw9VnXFqyecm52lq.jpg",
  5. "overview": "The Winter Feast is Po's favorite holiday. Every year he and his father hang decorations, cook together, and serve noodle soup to the villagers. But this year Shifu informs Po that as Dragon Warrior, it is his duty to host the formal Winter Feast at the Jade Palace. Po is caught between his obligations as the Dragon Warrior and his family traditions: between Shifu and Mr. Ping.",
  6. "release_date": 1290729600,
  7. "_formatted": {
  8. "id": "50393",
  9. "title": "Kung Fu Panda Holiday",
  10. "poster": "https://image.tmdb.org/t/p/w1280/gp18R42TbSUlw9VnXFqyecm52lq.jpg",
  11. "overview": "The Winter Feast is Po's favorite holiday. Every year he and his father hang decorations, cook together, and serve noodle soup to the villagers. But this year <em>Shifu</em> informs Po that as Dragon Warrior, it is his duty to host the formal Winter Feast at the Jade Palace. Po is caught between his obligations as the Dragon Warrior and his family traditions: between <em>Shifu</em> and Mr. Ping.",
  12. "release_date": 1290729600
  13. }
  14. }

When evaluated in HTML, the overview attribute in _formatted will look like as follows:

The Winter Feast is Po’s favorite holiday. Every year he and his father hang decorations, cook together, and serve noodle soup to the villagers. But this year Shifu informs Po that as Dragon Warrior, it is his duty to host the formal Winter Feast at the Jade Palace. Po is caught between his obligations as the Dragon Warrior and his family traditions: between Shifu and Mr. Ping.

Matches

This setting takes a Boolean value (true or false) and defines whether an object that contains information about the matches should be returned or not.

matches=<Boolean>

  • <Boolean> (Optional, boolean, defaults to false)

    If true, returns an array of the search query occurrences in all fields. A search query occurrence is given by a start position in the field and the length of the occurrence.

TIP

This is useful when you need to highlight the results without the default HTML highlighter.

Example

If you set matches to true:

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "shifu", "attributesToHighlight": ["overview"], "matches": true }'
  1. client.index('movies').search('n', {
  2. filters: 'title="Kung Fu Panda"',
  3. attributesToHighlight: ['overview'],
  4. matches: true
  5. })
  1. client.index('movies').search('n', {
  2. 'filters': 'title = "Kung Fu Panda"',
  3. 'attributesToHighlight': ['overview'],
  4. 'matches': 'true'
  5. })
  1. $client->index('movies')->search('shifu', ['attributesToHighlight' => ['overview'], 'matches' => true]);
  1. index.search('n', {
  2. filters: 'title="Kung Fu Panda"',
  3. attributesToHighlight: ['overview'],
  4. matches: true
  5. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "n",
  3. Filters: "title=\"Kung Fu Panda\"",
  4. AttributesToHighlight: []string{"overview"},
  5. Matches: true,
  6. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("n")
  3. .with_filters(r#"title="Kung Fu Panda""#)
  4. .with_attributes_to_highlight(Selectors::Some(&["overview"]))
  5. .with_matches(true)
  6. .execute()
  7. .await
  8. .unwrap();
  9. // Get the matches info
  10. let matched_info: Vec<&HashMap<String, Vec<MatchRange>>> = results.hits.iter().map(|r| r.matches_info.as_ref().unwrap()).collect();

You will get the following response with the information about the matches in the _matchesInfo object:

  1. {
  2. "id": "50393",
  3. "title": "Kung Fu Panda Holiday",
  4. "poster": "https://image.tmdb.org/t/p/w1280/gp18R42TbSUlw9VnXFqyecm52lq.jpg",
  5. "overview": "The Winter Feast is Po's favorite holiday. Every year he and his father hang decorations, cook together, and serve noodle soup to the villagers. But this year Shifu informs Po that as Dragon Warrior, it is his duty to host the formal Winter Feast at the Jade Palace. Po is caught between his obligations as the Dragon Warrior and his family traditions: between Shifu and Mr. Ping.",
  6. "release_date": 1290729600,
  7. "_matchesInfo": {
  8. "overview": [
  9. {
  10. "start": 159,
  11. "length": 5
  12. },
  13. {
  14. "start": 361,
  15. "length": 5
  16. }
  17. ]
  18. }
  19. }

Examples

Here are a few examples of what can be achieved with search parameters:

Results can be paginated using the limit and offset query parameters.

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "shifu", "limit": 5, "offset": 10 }'
  1. client.index('movies').search('shifu', {
  2. limit: 5,
  3. offset: 10
  4. })
  1. client.index('movies').search('shifu', {
  2. 'limit': 5,
  3. 'offset': 10
  4. })
  1. $client->index('movies')->search('shifu', ['limit' => 5, 'offset' => 10]);
  1. index.search('shifu', {
  2. limit: 5,
  3. offset: 10
  4. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "shifu",
  3. Limit: 5,
  4. Offset: 10,
  5. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("shifu")
  3. .with_limit(5)
  4. .with_offset(10)
  5. .execute()
  6. .await
  7. .unwrap();

You can filter results using the filters query parameter.

  1. curl 'http://localhost:7700/indexes/movies/search' \
  2. --data '{ "q": "Avengers", "filters": "release_date > 795484800" }'
  1. client.index('movies').search('Avengers', {
  2. filters: 'release_date > 795484800',
  3. })
  1. client.index('movies').search('Avengers', {
  2. 'filters': 'release_date > 795484800'
  3. })
  1. $client->index('movies')->search('Avengers', ['filters' => 'release_date > 795484800']);
  1. index.search('Avengers', {
  2. filters: 'release_date > 795484800'
  3. })
  1. results, error := client.Search("movies").Search(meilisearch.SearchRequest{
  2. Query: "Avengers",
  3. Filters: "release_date > \"795484800\"",
  4. })
  1. let results: SearchResults<Movie> = movies.search()
  2. .with_query("Avengers")
  3. .with_filters("release_date > 795484800")
  4. .execute()
  5. .await
  6. .unwrap();