I have the following filtered query right now:
{
"query": {
"filtered": {
"query": {
"query_string": {
"query": "MySQL Apple"
}
},
"filter": {
"and": [
{
"term": {
"is_active": true
}
},
{
"not": {
"terms": {
"id": [
6433746,
5308541
]
}
}
},
{
"not": {
"terms": {
"linkedin_id": [
"D-D5EAmm_J",
"SxQY_1y5pA",
"Nqt6b6We2-"
]
}
}
},
{
"not": {
"terms": {
"fb_user_id": [
"120139",
"503009",
"610039"
]
}
}
}
]
}
}
},
"size": 9,
"fields": [
"id"
]
}
As you can see I need the following:
- Search the _all field for query text
- Filter out certain Facebook, Linkedin, and system users
As part of this, I would like to add the following:
Boost certain results when their field "fb_connections" contains certain
IDs that I will pass in. Likewise for the "linkedin_connections" field.
Can I still use a filtered query? If so, what might that addition look
like? If not, what is the more appropriate query type.
Thanks,
Brandon
--