Skip to content

Default Operator

Edit page

The default operator for text queries can be set by using the desired modifier.

OR uses the _or modifier (the default).

AND uses the _and modifier.

To make AND the default operator and thus forcing a query to search for all terms instead of any term (which is the default):

SEARCH /bank/
{
"_query": {
"personality": {
"_and": "these days are few and far between"
}
}
}

Elite Set uses the _elite_set modifier.

SEARCH /bank/
{
"_query": {
"personality": {
"_elite_set": "the biggest two things to know are that hes lovable and cooperative. Of course he's also kind, honest and considerate, but they're far less prominent, especially compared to impulses of being shallow as well"
}
}
}