# Upgrade version from 2 to 7

**URL:** https://discuss.elastic.co/t/upgrade-version-from-2-to-7/353346
**Category:** Elastic Search
**Tags:** elastic-app-search
**Created:** [February 15, 2024, 9:05am UTC](https://discuss.elastic.co/t/upgrade-version-from-2-to-7/353346 "2024-02-15T09:05:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nicdnepr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicdnepr/32/131771_2.png) [@nicdnepr](https://discuss.elastic.co/u/nicdnepr)
#### Post date: [February 15, 2024, 9:05am UTC](https://discuss.elastic.co/t/upgrade-version-from-2-to-7/353346/1 "2024-02-15T09:05:33Z")

</div>

I moved site to new server, and my new elastic version is 7.9.2 and old version is 2.3.5  
I use this command to move indexes

```auto
elasticdump --input=http://localhost:9200/nut_uk --output=nut_uk_mapping.json --type=mapping
elasticdump --input=http://localhost:9200/nut_uk --output=nut_uk_data.json --type=data

```

after backup I edited nut\_uk\_mapping.json before import to new server. Then I update elastic lib and edit search query  
old query is

```auto
return [
            'filtered' => [
                'query' => [
                    'multi_match' => [
                        'query' => $queryString ?? '',
                        'type' => 'best_fields',
                        'minimum_should_match' => '90%',
                        'fields' => [
                            'label^3',
                            'content^2',
                            'builder_content^2',
                        ]
                    ],
                ],
                'filter' => [
                    'bool' => [
                        'must' => [
                            ['term' => ['language' => \Yii::$app->language]],
                            ['term' => ['published' => 1]],
                        ],
                    ],
                ],
            ]
        ];

```

new is

```auto
 return [
            'bool' => [
                'must' => [
                    'multi_match' => [
                        'query' => $queryString ?? '',
                        'type' => 'best_fields',
                        'minimum_should_match' => '90%',
                        'fields' => [
                            'label^3',
                            'content^2',
                            'builder_content^2',
                        ]
                    ],
                ],
                'filter' => [
                    'bool' => [
                        'must' => [
                            ['term' => ['language' => \Yii::$app->language]],
                            ['term' => ['published' => 1]],
                        ],
                    ],
                ],
            ]
        ];

```

but the problem is it search nothing, old server search worked. what the problem?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 15, 2024, 10:56am UTC](https://discuss.elastic.co/t/upgrade-version-from-2-to-7/353346/2 "2024-02-15T10:56:57Z")

</div>

Welcome!

Not enough details here but I'd first check the mappings.

If you can't find what is happening, could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can **copy and paste in Kibana dev console** , click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

Have a look at the [Elastic Stack and Solutions Help · Forums and Slack | Elastic](https://elastic.co/community/help) page. It contains also lot of useful information on how to ask for help.

---

<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: [March 14, 2024, 10:57am UTC](https://discuss.elastic.co/t/upgrade-version-from-2-to-7/353346/3 "2024-03-14T10:57:47Z")

</div>

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