Hash


| Definition | Key | Value | ENum |

The hash code is very important in HiLang because we use “Protocol Buffers” (Protobuf ) for serialization of the Key (modified for search) and Value. Elements are serialized and deserialized using the hash number in place of the field/value name for efficiency. {Entities, Segments, Aspects, Indexes} also have hash codes because they are fields in the envelop of the serialized buffer for key and value. If an element or key/value does not have hash code, one is assigned starting with the highest unused value. It is best practice to always assign a hash code to elements, key, and values to ensure that an additional item is not assigned the same number as an item that was previously used by a field that was removed.

Hash values for each key and value must be unique within the entity/segment/aspect. Extent #hash values need to be globally unique because the hash value is used when creating indexes

Copyright © Cepheis 2024