Skip to content

Commit d485ecc

Browse files
committed
Document that filter() can return more than just filterspec params
Document that filter() can return retired and exct_match_spec parameters as well. Also that the filter() params are incorporated in the database query rather than filtering the data after it is returned from the database. Ralf can you verify that this rewite is correct?
1 parent f65781c commit d485ecc

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

doc/reference.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,9 +1532,14 @@ shows the use of ``ctx``.
15321532

15331533
The ``filter`` function must return a *list* of dictionaries of
15341534
parameters of the
1535-
`Class.filter <design.html#:~:text=search_matches>`_ call. Results
1536-
found during a query executed by an index template are passed
1537-
through the filter calls computed by the ``filter`` function. An
1535+
`Class.filter <design.html#:~:text=search_matches>`_ call.
1536+
This includes filterspec, retired and exact_match_specs.
1537+
Note that sort and group parameters of the filter call should
1538+
not be set by filter method (they will be overwritten) and the
1539+
parameter search_matches must not be set.
1540+
1541+
The query executed by an index template is modified by the
1542+
parameters computed by the ``filter`` function. An
15381543
empty list of filter parameters (``[]``) indicates no access. When
15391544
using a filter, a check function is still needed to test each
15401545
individual item for visibility. When the filter function is defined

0 commit comments

Comments
 (0)