# Murmur3 field not getting applied

**URL:** <https://discuss.elastic.co/t/murmur3-field-not-getting-applied/177907>\
**Category:** Elasticsearch\
**Created:** [April 22, 2019, 10:25pm UTC](https://discuss.elastic.co/t/murmur3-field-not-getting-applied/177907 "2019-04-22T22:25:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arvinds94](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@arvinds94](https://discuss.elastic.co/u/arvinds94)\
**Post date:** [April 22, 2019, 10:25pm UTC](https://discuss.elastic.co/t/murmur3-field-not-getting-applied/177907/1 "2019-04-22T22:25:47Z")

</div>

There were no pre existing templates when making the following requests.

Created an index using the following request.

 ![08%20PM](https://us1.discourse-cdn.com/elastic/original/3X/e/2/e22a80cc72da965d061d3e98b355b0c2e8c303f1.png)

At the top you can see that I have added murmur3 as a field to the accountId type. I then reindexed documents into the newly created index and tried to do cardinality aggregations on the accountId field. The reindex request is here.  
 ![14%20PM](https://us1.discourse-cdn.com/elastic/original/3X/1/1/11683968911ad9145db3147ddfa303b7e532930b.png)

Cardinality Aggregation and result when using just accountId.

 ![27%20PM](https://us1.discourse-cdn.com/elastic/original/3X/8/8/88e4d4679e472e7bb6b8a2069bc440c59d7b5e4e.png)  
Result:  
 ![06%20PM](https://us1.discourse-cdn.com/elastic/original/3X/8/2/825dfcd8fcf718c04f12f38e783a670d41569f97.png)

Query with accountId.hash

 ![09%20PM](https://us1.discourse-cdn.com/elastic/original/3X/c/f/cf912437a0cccc339145ef4fa280db9aaafdc4cc.png)

Result, where cardinality can be seen with value 0 for all buckets:

 ![17%20PM](https://us1.discourse-cdn.com/elastic/original/3X/3/9/39407ae2cc673699fa79d9998950af44ad19fc4f.png)

Mapping of index created at the beginning seems to have changed post reindex. It now has two different property maps wherein accountId has two different definitions. It seems like murmur3 hasn't been applied to this field, but I am not sure why or how to force the mapping defined when creating the index.

 ![20%20PM](https://us1.discourse-cdn.com/elastic/original/3X/b/6/b6f3d041093a397eadc4db028dc06f03831242de.png)

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [April 23, 2019, 12:12pm UTC](https://discuss.elastic.co/t/murmur3-field-not-getting-applied/177907/2 "2019-04-23T12:12:47Z")

</div>

The mapping that you're defining in the first screenshot is for a document type `split_doc`. The documents that you're aggregating on seem to be of a different type: `utterance`.

When you reindex your documents to the `utterance` type, there is no `.hash` multifield defined in the mapping for that type, and as a result the cardinality of those hashes is going to be 0.

Try changing the type when you reindex your data, by providing a `type` in the `dest` clause of your reindex request:

```auto
POST _reindex
{
  "source": {
    "index": "utterance",
    "query": { ***YOUR QUERY*** }
  },
  "dest": {
    "index": "2018.12.split",
    "version_type": "internal", 
    "type": "split_doc"
  }
}

```

Or, even easier: in the initial index creation request, change the document type from `split_doc` into `utterance`.

(By the way, posting screenshots of those requests makes those really hard to read. It would be much easier if you would copy and paste the actual requests, formatted with the `</>` button.)

---

<div class="post-metadata">

**Author:** ![arvinds94](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@arvinds94](https://discuss.elastic.co/u/arvinds94)\
**Post date:** [April 23, 2019, 8:13pm UTC](https://discuss.elastic.co/t/murmur3-field-not-getting-applied/177907/3 "2019-04-23T20:13:03Z")

</div>

Really appreciate you taking the time to respond. Will keep your suggestion for the pictures in mind for the future to make it easier for everyone reading the questions.

---

<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:** [May 21, 2019, 8:13pm UTC](https://discuss.elastic.co/t/murmur3-field-not-getting-applied/177907/4 "2019-05-21T20:13:04Z")

</div>

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