Skip to content

Commit

Permalink
Corrected documentation of sort option (#1773)
Browse files Browse the repository at this point in the history
Fixes #1318
  • Loading branch information
miguelgrinberg committed Apr 11, 2024
1 parent cb8e35d commit 0c0bdb7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/faceted_search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ declaring a ``FacetedSearch`` subclass:
values should be instances of any ``Facet`` subclass, for example: ``{'tags':
TermsFacet(field='tags')}``

``sort``
tuple or list of fields on which the results should be sorted. The format of
the individual fields are to be the same as those passed to
:meth:`~elasticsearch_dsl.Search.sort`.


Facets
~~~~~~
Expand Down Expand Up @@ -95,7 +90,7 @@ Usage
-----

The custom subclass can be instantiated empty to provide an empty search
(matching everything) or with ``query`` and ``filters``.
(matching everything) or with ``query``, ``filters`` and ``sort``.

``query``
is used to pass in the text of the query to be performed. If ``None`` is
Expand All @@ -107,6 +102,12 @@ The custom subclass can be instantiated empty to provide an empty search
the name of the facet (from ``.facets`` attribute) as the key and one of the
possible values as value. For example ``{'tags': 'python'}``.

``sort``
is a tuple or list of fields on which the results should be sorted. The format
of the individual fields are to be the same as those passed to
:meth:`~elasticsearch_dsl.Search.sort`.


Response
~~~~~~~~

Expand Down

0 comments on commit 0c0bdb7

Please sign in to comment.