elasticsearch/docs/reference/scripting-languages/painless/painless-analysis-predicate-context.md
Colleen McGinnis b7e3a1e14b
[docs] Migrate docs from AsciiDoc to Markdown (#123507)
* delete asciidoc files

* add migrated files

* fix errors

* Disable docs tests

* Clarify release notes page titles

* Revert "Clarify release notes page titles"

This reverts commit 8be688648d.

* Comment out edternal URI images

* Clean up query languages landing pages, link to conceptual docs

* Add .md to url

* Fixes inference processor nesting.

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Liam Thompson <leemthompo@gmail.com>
Co-authored-by: Martijn Laarman <Mpdreamz@gmail.com>
Co-authored-by: István Zoltán Szabó <szabosteve@gmail.com>
2025-02-27 17:56:14 +01:00

1.3 KiB

mapped_pages
https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-analysis-predicate-context.html

Analysis Predicate Context [painless-analysis-predicate-context]

Use a painless script to determine whether or not the current token in an analysis chain matches a predicate.

Variables

params (Map, read-only)
User-defined parameters passed in as part of the query.
token.term (CharSequence, read-only)
The characters of the current token
token.position (int, read-only)
The position of the current token
token.positionIncrement (int, read-only)
The position increment of the current token
token.positionLength (int, read-only)
The position length of the current token
token.startOffset (int, read-only)
The start offset of the current token
token.endOffset (int, read-only)
The end offset of the current token
token.type (String, read-only)
The type of the current token
token.keyword (boolean, read-only)
Whether or not the current token is marked as a keyword

Return

boolean
Whether or not the current token matches the predicate

API

The standard Painless API is available.