The below are my query for selection and rejection.
Selection :
{
"nested": {
"path": "somethingnew",
"query": {
"bool": {
"must": [
{
"simple_query_string": {
"default_operator": "and",
"fields": [
"somethingnew.workexp"
],
"query": "(Tableau) Or (Tableau) Or (Tableau workbooks)"
}
},
{
"simple_query_string": {
"default_operator": "and",
"fields": [
"somethingnew.summary"
],
"query": "(Tableau) Or (Tableau) Or (Tableau workbooks)"
}
},
{
"match": {
"somethingnew.uniqueid": {
"query": "FH-SAM-3"
}
}
}
]
}
}
}
}
Rejection Query
{
"nested": {
"path": "applications",
"query": {
"bool": {
"must": [
{
"match": {
"applications.forreqid": {
"query": "FH-REQ-3"
}
}
}
],
"must_not": [
{
"simple_query_string": {
"default_operator": "and",
"fields": [
"applications.workexp"
],
"query": "(Tableau) Or (Tableau) Or (Tableau workbooks)"
}
},
{
"simple_query_string": {
"default_operator": "and",
"fields": [
"applications.summary"
],
"query": "(Tableau) Or (Tableau) Or (Tableau workbooks)"
}
}
]
}
}
}
}
The query doesnot return any results even when there are value in "summary" and workexp field