count
Arguments
The first optional parameters restriction_type, N1 and N2 are used to specify number of words/phrases that must match the query.
N1 and optionally N2 are used to specify either reference value or endpoints of the interval.
The restriction_type parameter accepts one of the following values:
restriction_type |
synonym |
description |
less |
lt; < |
number of words matched by the query should be less than [N1] |
less or equal |
le; <=; less_equal |
number of words matched by the query should be less than or equal to [N1] |
greater |
gt; > |
number of words matched by the query should be greater than [N1] |
greater or equal |
ge; >=; greater_equal |
number of words matched by the query should be greater than or equal to [N1] |
equal |
eq; = |
number of words matched by the query should be equal to [N1] |
not equal |
ne; !=; not_equal |
number of words matched by the query should not be equal to [N1] |
between |
bt; () |
number of words matched by the query should be between N1 and N2 |
between or equal |
be; []; between_equal |
number of words matched by the query should be between N1 and N2, including N1 and N2 |
left-open |
lo; (]; left_open |
number of words matched by the query should be between N1 and N2, including N2 |
right-open |
ro; [); right_open |
number of words matched by the query should be between N1 and N2, including N1 |
The default value of the parameter is set to "equal".
If the restriction_type consists of mathematical symbols, they should be enclosed in quotes (">", "()", "!=", etc.).
If the restriction_type name consists of two or more words or contains a hyphen, it should also be enclosed in quotes ("not equal", "between or equal", "right-open").
If no explicit restriction_type or reference values are specified, the function returns all documents matched by the query regardless of the number of matches.