# Top\_hits after upgrade to 2.4.6 from 1.3.2

**URL:** <https://discuss.elastic.co/t/top-hits-after-upgrade-to-2-4-6-from-1-3-2/106515>\
**Category:** Elasticsearch\
**Created:** [November 6, 2017, 11:47am UTC](https://discuss.elastic.co/t/top-hits-after-upgrade-to-2-4-6-from-1-3-2/106515 "2017-11-06T11:47:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![juanito](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juanito/32/22927_2.png) [@juanito](https://discuss.elastic.co/u/juanito)\
**Post date:** [November 6, 2017, 11:47am UTC](https://discuss.elastic.co/t/top-hits-after-upgrade-to-2-4-6-from-1-3-2/106515/1 "2017-11-06T11:47:39Z")

</div>

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

```

}

---

<div class="post-metadata">

**Author:** ![juanito](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juanito/32/22927_2.png) [@juanito](https://discuss.elastic.co/u/juanito)\
**Post date:** [November 6, 2017, 9:27pm UTC](https://discuss.elastic.co/t/top-hits-after-upgrade-to-2-4-6-from-1-3-2/106515/2 "2017-11-06T21:27:24Z")

</div>

I removed "CatalogProduct." and it works

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 7, 2017, 12:12am UTC](https://discuss.elastic.co/t/top-hits-after-upgrade-to-2-4-6-from-1-3-2/106515/3 "2017-11-07T00:12:10Z")

</div>

Thanks for sharing the resolution 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 5, 2017, 12:12am UTC](https://discuss.elastic.co/t/top-hits-after-upgrade-to-2-4-6-from-1-3-2/106515/4 "2017-12-05T00:12:34Z")

</div>

Closed on December 5, 2017, 12:12am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
