Search for 2 key words in a single query

Is there any way to search for 2 key words in a single query.

Eg:

[
{
id:1
name:Jim,
description:cool guy,
employer:Delta Dental,
address: Okemos
},
{
id:2,
name:Jim,
description: grumpy guy,
employer: FedEx,
address:Memphis
},
{
id:3,
name:Jim,
description: funny guy,
employer: Delta Dental,
address: Okemos
},
id:4,
name:Jim,
description: funny guy,
employer: Delta Dental,
address: Minnesota
}
]

I wanna search for user Jim, who is a cool guy, who works for DeltaDental and lives in Okemos??

I am thinking the query should be

Query:"Jim"
"filters": {
"all": [
{
description:"cool guy"
},
{
employer: Delta Dental
},
{
address: Okemos
}
]
}

Is the above query correct?? or is there any other efficient way ?

sometimes the query could be search for user who is a cool guy, who works for DeltaDental and lives in Okemos?? In this case there is not user name specified. so what do I do now?

Is there a way for the below query??

Query:"Jim","cool guy"
"filters": {
"all": [
{
employer: Delta Dental
},
{
address: Okemos
}
]
}

Hi, I believe you can use the "AND" keyword in searches. For example: https://search-ui-stable.netlify.com/?q=Florida%20AND%20everglades&size=n_20_n

You may also apply the following Lucene Query Syntax functions: double quoted strings, + and -, AND, OR, and NOT.

1 Like