# Porting \_all field when migrating from ES 1.7.5 to 7.4

**URL:** <https://discuss.elastic.co/t/porting-all-field-when-migrating-from-es-1-7-5-to-7-4/210995>\
**Category:** Elasticsearch\
**Created:** [December 8, 2019, 6:28am UTC](https://discuss.elastic.co/t/porting-all-field-when-migrating-from-es-1-7-5-to-7-4/210995 "2019-12-08T06:28:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joneslee85](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joneslee85/32/20980_2.png) [@joneslee85](https://discuss.elastic.co/u/joneslee85)\
**Post date:** [December 8, 2019, 6:28am UTC](https://discuss.elastic.co/t/porting-all-field-when-migrating-from-es-1-7-5-to-7-4/210995/1 "2019-12-08T06:28:17Z")

</div>

Hi all

I am in the process of migrating following mapping in ES 1.7.5 to 7.4:

```auto
name:
  type: 'string'
  index: 'analyzed'
  include_in_all: true
  fields:
    name_bm25:
      type: 'string'
      index: 'analyzed'
      analyzer: 'english_custom_stems'
      similarity: 'BM25'
      include_in_all: true

```

as you could see above, I have multi-field `name_bm25` of which values is also added to `_all` field (NOTE: I use `include_in_all: true`)

So when I migrate to ES 7.x, I was forced to create a new field `_all` because this field feature is no longer available. Below is my new mapping:

```auto
_all:
  type: 'text'
  store: false

name:
  type: 'text'
  copy_to: '_all'
  fields:
    name_bm25:
      type: 'text'
      analyzer: 'english_custom_stems'
      similarity: 'BM25'
      copy_to: '_all' # <= this is not working

```

I use `copy_to` to copy field values to `_all` field which works with `name` field however the `copy_to` does not work with term (results after analysis) of multi-field `name.name_bm25`.

I would like to ask if I want to copy the analysed value of `name.name_bm25` to `_all`, what should I do? OR do I have to do it? (in the case if I misunderstand the `copy_all`).

So seems to me one solution is to add a new `name_bm25` field with _analysed field value_ (either manually or taking advantage of `_analyze` API), for example:

```auto
_all:
  type: 'text'
  store: false

name_bm25: # NOTE: field value must be analysed in advance
  type: 'text'
  copy_to: '_all'

name:
  type: 'text'
  copy_to: '_all'
  fields:
    name_bm25:
      type: 'text'
      analyzer: 'english_custom_stems'
      similarity: 'BM25'

```

I don't think it is the right approach as it does not feel right to do that manually.

Any help is greatly appreciated. Thanks much in advance

---

<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:** [January 5, 2020, 6:28am UTC](https://discuss.elastic.co/t/porting-all-field-when-migrating-from-es-1-7-5-to-7-4/210995/2 "2020-01-05T06:28:32Z")

</div>

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