Murmur3 field not getting applied

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

Created an index using the following request.

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.

Cardinality Aggregation and result when using just accountId.


Query with accountId.hash

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

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.

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:

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.)

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.

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