# "flattened" type with OpenDistro

**URL:** <https://forum.opensearch.org/t/flattened-type-with-opendistro/5014>\
**Category:** General Feedback\
**Created:** [February 17, 2021, 11:07am UTC](https://forum.opensearch.org/t/flattened-type-with-opendistro/5014 "2021-02-17T11:07:07Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![aparo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/aparo/32/224_2.png) [@aparo](https://forum.opensearch.org/u/aparo)\
**Post date:** [April 13, 2021, 3:26pm UTC](https://forum.opensearch.org/t/flattened-type-with-opendistro/5014/9 "2021-04-13T15:26:53Z")

</div>

The migration was very fast using a perl script to rename the packages:

```auto
#!/bin/bash

find . -type f \( -iname \*.scala -o -iname \*.sbt \) -exec perl -pi -e '
  undef $/;
  use Regexp::Common;
  $x= "(){"."}";
  $bp = "(?:$RE{balanced}{-parens=>$x})";
  $arg = "(?:[^()}{,]*$bp?)+";
  s/elasticsearch/opensearch/g;

' {} +

chcase -rd -x 's/elasticsearch/opensearch/g' .

```

---

_[View the full topic](https://forum.opensearch.org/t/flattened-type-with-opendistro/5014)._
