What's wrong with this query?
GET /catalog/_search
{"query": {
"function_score": {
"boost_mode": "multiply",
"functions": [
{
"field_value_factor": {
"field": "boostFactor",
"factor": 1,
"missing": 1
}
}
],
"query": {
"dis_max": {
"queries": [
{
"bool": {
"should": [
{
"multi_match": {
"query": "cloth",
"type": "cross_fields",
"fields": [
"keywords.nouns^6",
"name^5",
"brand.brandName^4",
"category.categoryName^3",
"family.familyName^2",
"attributeValues",
"mpn^2",
"tags",
"category.rootCategoryName^3",
"category.level1CategoryName^3",
"category.level2CategoryName^3",
"category.level3CategoryName^3"
],
"minimum_should_match": "2<75%"
}
}
],
"must_not": [
{
"term": {
"isActive": false
}
}
]
}
},
{
"multi_match": {
"query": "cloth",
"analyzer": "whitespace",
"fields": [
"id^3"
]
}
},
{
"bool": {
"must": [
{
"match_phrase_prefix": {
"partial_id": "cloth"
}
}
],
"must_not": [
],
"should": [
]
}
}
]
}
}
},"bool": {
"must": [
{
"term": {
"isActive": {
"value": true
}
}
}
],
"must_not": [
{
"term": {
"family.familyId": {
"value": 0
}
}
}
],
"should": [
{
"terms": {
"feefoAvgRating": [
"5",
"4"
]
}
},
{
"terms": {
"industries": [
21
]
}
}
]
}}}
It errors when i include bool
query after function_score
, works fine without bool query.