Elasticsearch - Unique values in a field of an index -


i have index of following type:

{   company: {     watchlist: [ {id: 1}, {id: 2}, {id, 1} ]   } } 

in watchlist array in indexes, duplicate values stored. want indexes not store duplicate values increasing size of index.

i know can unique values calling aggregation, want here store unique values in index.

i using elasticsearch rails here, indexes data according json returned 'as_indexed_json' method. data above index in sql database, cannot change. can create indexes database, need 'uniqueness' constraint on field 'watchlist'.

is there way it?


Comments

Popular posts from this blog

elasticsearch python client - work with many nodes - how to work with sniffer -

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -