Protected_operatorsProtectedequalsStatic ReadonlyINPUT_Represents the placeholder "block" in operator display names.
the arity of the operator.
ProtectedcheckSimple implementation of query generation. Will not be suitable for all Operator derivatives.
Escapes the first argument from the args array, calls the [query()]Operator#query function for each keyword and combines
the results with an OR operator.
query that wos constructed with the given arguments and keywords. Returns an empty query if no arguments are provided.
The name template is used when generating search GUI, and so the arity of the operator should match the number of INPUT_PLACEHOLDER constant occurrences in the returned array.
an array of translation paths that represent the operator name, as it should be displayed to the user. The INPUT_PLACEHOLDER constant (or any falsy value) can be used to place visual input placeholder blocks in the operator name where user input is expected.
StaticescapeEscapes all escapable Elasticsearch symbols. Removes all unescapable Elasticsearch symbols.
For a list of symbols see Elasticsearch's Query string query [doc]https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters.
user input that should have special characters escaped
user input with the escapable characters escaped and the unescapable characters removed
StaticforStaticqueryCreates a PFQL query with the provided arguments.
PFQL keyword for the field you want to query
The value that you want to query the property for
The PFQL operator you want to use to query the field.
combines the input strings by this pattern: [pfqlKeyword] [operator] [arg]
StaticwrapWraps the input if the value is of a string type and canWrap is set to true
user input that should be wrapped with double quotes
is set to true if the wrapping is allowed
Represents the low level abstraction of query generation that is responsible for the creation of queries themselves.
Operators are ment to be stateless and held as singleton instances, as they can be shared without any issues. This library uses the OperatorService to store the singleton instances, but you can use your own solution, or instantiate them multiple times if you prefer.
Typeparam
T type of arguments this Operator can generate queries from