IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Filter context
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Filter context
editUse a Painless script as a filter in a query to include and exclude documents.
Variables
-
params(Map, read-only) - User-defined parameters passed in as part of the query.
-
doc(Map, read-only) -
Contains the fields of the current document where each field is a
Listof values.
Return
-
boolean -
Return
trueif the current document should be returned as a result of the query, andfalseotherwise.
API
The standard Painless API is available.