near
Purpose
Finds documents that contain a sequence of arguments regardless of their relative order. Gaps between the arguments are not allowed by default.
Arguments
The function accepts several arguments:
-
The first optional argument distance specifies maximum distance (in tokens) between the last and the first position of the sequence;
-
The second and the next arguments define the terms to search for (the number of them is unlimited).
The function also supports optional named parameters:
-
range sets exact length of the sequence in tokens, min_range sets minimum length, max_range sets maximum length;
-
distance sets exact difference in positions between the first and the last argument of the sequence, min_distance sets minimum difference, max_distance sets maximum difference;
-
gap sets exact number of tokens between arguments of the sequence, min_gap sets minimum number, max_gap sets maximum number;
-
interval sets exact difference in positions between arguments of the sequence, min_interval sets minimum difference, max_interval sets maximum difference;
-
allow_punct:=yes/no allows or prohibits punctuation between arguments (set to "yes" by default);
-
allow_space:=yes/no allows or prohibits spaces between arguments (set to "yes" by default);
-
match:=range matches text range starting from the first found term and ending with the last found term.
-
match:=inverse matches text range starting from the first found term and ending with the last found term except for the specified arguments.