I just upgrade to 2.4.6 from 1.3,
And a query that works in in 1.3 not work in 2.4.6, the data is the same. I mean that in 1.3 I getting hits in top_hits bucket, but not in 2.4.6.
I need to know the problem here, is there any syntax that is not working in 2.4.6? And what is the new syntax?
Here is the query:
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"filtered": {
"filter": {
"bool": {
"must": {
"terms": {
"_type": [
"CatalogProduct",
"Pharmacy",
"Page"
]
}
}
}
},
"query": {
"multi_match": {
"query": "alve",
"type": "cross_fields",
"fields": [
"CatalogProduct.ProductName",
"CatalogProduct.ProductName.ngrams",
"CatalogProduct.ProductNumber",
"CatalogProduct.Id",
"CatalogProduct.Description.ngrams",
"CatalogProduct.SummarySalesText",
"CatalogProduct.SummaryAttribute",
"CatalogProduct.SummaryHint",
"CatalogProduct.Info",
"CatalogProduct.Form",
"CatalogProduct.Categories",
"Page.Title",
"Page.Summary",
"Page.PageName",
"Page.Content",
"Page.MetaTitle",
"Page.MetaKeywords",
"Page.MetaDescription",
"Pharmacy.PharmacyName",
"Pharmacy.Region",
"Pharmacy.Address"
]
}
}
}
}
}
}
}
},
"aggs": {
"ResultType": {
"terms": {
"field": "_type"
},
"aggs": {
"top_hits": {
"top_hits": {
"size": 1
}
}
}
}
},
"size": 0
}