Skip to content

Corrected documentation of sort option #1773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading