Skip to content

Wrong argument order in facet_search .code-samples #863

@ellnix

Description

@ellnix

Description
Incorrect documentation.

Expected behavior
The code sample in the documentation to correspond to the implemented method.

Current behavior
The facet_name and facet_query ordered parameters are switched around in the documentation.

Screenshots or Logs

  • meilisearch/index.py
    # snip
    def facet_search(
        self,
        facet_name: str,
        facet_query: Optional[str] = None,
        opt_params: Optional[Dict[str, Any]] = None,
    ) -> Dict[str, Any]: 
    # snip
  • .code-samples.meilisearch.yaml
facet_search_1: |-
  client.index('books').facet_search('fiction', 'genres', {
    'filter': 'rating > 3'
  })
facet_search_3: |-
  client.index('books').facet_search('c', 'genres')
  • .code-samples.meilisearch.yaml (in meilisearch/documentation)
facet_search_1: |-
  curl \
    -X POST 'http://localhost:7700/indexes/books/facet-search' \
    -H 'Content-Type: application/json' \
    --data-binary '{
      "facetQuery": "fiction",
      "facetName": "genres",
      "filter": "rating > 3"
    }'
facet_search_3: |-
  curl \
    -X POST 'http://localhost:7700/indexes/books/facet-search' \
    -H 'Content-Type: application/json' \
    --data-binary '{
      "facetQuery": "c",
      "facetName": "genres"
  }'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions