Functions
abs()
| Parameter | Type |
|---|---|
expr | LogicalExpression |
LogicalExpression
all()
expr is true.
Parameters
| Parameter | Type |
|---|---|
exprs | LogicalExpression[] |
LogicalExpression
any()
expr is true.
Parameters
| Parameter | Type |
|---|---|
exprs | LogicalExpression[] |
LogicalExpression
field()
| Parameter | Type |
|---|---|
name | string |
LogicalExpression
filter()
| Parameter | Type |
|---|---|
expr | | LogicalExpression | TextExpression |
Query
literal()
| Parameter | Type |
|---|---|
value | | string | number | boolean | string[] | number[] | List |
LogicalExpression
match()
| Parameter | Type |
|---|---|
token | string |
options? | MatchOptions |
TextExpression
max()
| Parameter | Type |
|---|---|
left | | string | number | LogicalExpression |
right | | string | number | LogicalExpression |
LogicalExpression
min()
| Parameter | Type |
|---|---|
left | | string | number | LogicalExpression |
right | | string | number | LogicalExpression |
LogicalExpression
not()
| Parameter | Type |
|---|---|
expr | LogicalExpression |
LogicalExpression
select()
| Parameter | Type |
|---|---|
exprs | Record<string, | LogicalExpression | FunctionExpression> |
Query
Classes
FunctionExpression
Internal
LogicalExpression
Internal
Methods
abs()
LogicalExpression
add()
| Parameter | Type |
|---|---|
other | | number | LogicalExpression |
LogicalExpression
and()
| Parameter | Type |
|---|---|
other | | boolean | LogicalExpression |
LogicalExpression
boost()
boost value if the condition is true.
Otherwise, the scoring expression is unchanged (multiplied by 1).
Parameters
| Parameter | Type |
|---|---|
condition | | boolean | LogicalExpression |
boost | | number | LogicalExpression |
LogicalExpression
choose()
| Parameter | Type |
|---|---|
x | | string | number | boolean | LogicalExpression |
y | | string | number | boolean | LogicalExpression |
LogicalExpression
coalesce()
| Parameter | Type |
|---|---|
other | | number | LogicalExpression |
LogicalExpression
contains()
| Parameter | Type |
|---|---|
other | | string | number | LogicalExpression |
LogicalExpression
div()
| Parameter | Type |
|---|---|
other | | number | LogicalExpression |
LogicalExpression
eq()
| Parameter | Type |
|---|---|
other | | string | number | boolean | LogicalExpression |
LogicalExpression
exp()
LogicalExpression
gt()
| Parameter | Type |
|---|---|
other | | string | number | LogicalExpression |
LogicalExpression
gte()
| Parameter | Type |
|---|---|
other | | string | number | LogicalExpression |
LogicalExpression
in()
| Parameter | Type |
|---|---|
other | | string | string[] | number[] | LogicalExpression | List |
LogicalExpression
isNotNull()
LogicalExpression
isNull()
LogicalExpression
ln()
LogicalExpression
lt()
| Parameter | Type |
|---|---|
other | | string | number | LogicalExpression |
LogicalExpression
lte()
| Parameter | Type |
|---|---|
other | | string | number | LogicalExpression |
LogicalExpression
matchAll()
| Parameter | Type |
|---|---|
other | | string | string[] | LogicalExpression |
LogicalExpression
matchAny()
| Parameter | Type |
|---|---|
other | | string | string[] | LogicalExpression |
LogicalExpression
max()
| Parameter | Type |
|---|---|
other | | string | number | LogicalExpression |
LogicalExpression
min()
| Parameter | Type |
|---|---|
other | | string | number | LogicalExpression |
LogicalExpression
mul()
| Parameter | Type |
|---|---|
other | | number | LogicalExpression |
LogicalExpression
ne()
| Parameter | Type |
|---|---|
other | | string | number | boolean | LogicalExpression |
LogicalExpression
or()
| Parameter | Type |
|---|---|
other | | boolean | LogicalExpression |
LogicalExpression
regexpMatch()
| Parameter | Type |
|---|---|
other | string |
flags? | string |
LogicalExpression
sqrt()
LogicalExpression
square()
LogicalExpression
startsWith()
| Parameter | Type |
|---|---|
other | | string | LogicalExpression |
LogicalExpression
sub()
| Parameter | Type |
|---|---|
other | | number | LogicalExpression |
LogicalExpression
toString()
string
Query
Internal
A query object that represents a sequence of query stages.
Queries are built by chaining together different stages like select, filter, topk, etc.
Each stage performs a specific operation on the data.
Methods
count()
Query
filter()
| Parameter | Type |
|---|---|
expr | | LogicalExpression | TextExpression |
Query
limit()
| Parameter | Type |
|---|---|
k | number |
Query
rerank()
| Parameter | Type |
|---|---|
options? | RerankOptions |
Query
select()
| Parameter | Type |
|---|---|
exprs | Record<string, | LogicalExpression | FunctionExpression> |
Query
sort()
| Parameter | Type |
|---|---|
expr | LogicalExpression |
asc? | boolean |
Query
topk()
| Parameter | Type |
|---|---|
expr | LogicalExpression |
k | number |
asc? | boolean |
Query
TextExpression
Constructors ConstructorTextExpression
Methods
and()
| Parameter | Type |
|---|---|
other | TextExpression |
TextExpression
or()
| Parameter | Type |
|---|---|
other | TextExpression |
TextExpression