java.lang.Object
org.elasticsearch.index.mapper.RoutingPathFields
- All Implemented Interfaces:
RoutingFields
Implementation of routing fields, using field matching based on the routing path content.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.RoutingFields
RoutingFields.Noop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddBoolean(String fieldName, boolean value) addIp(String fieldName, InetAddress value) This overloaded method tries to take advantage of the fact that the UTF-8 value is already computed in some cases when we want to collect routing fields, so we can save re-computing the UTF-8 encoding.addUnsignedLong(String fieldName, long value) Here we build the hash of the routing values using a similarity function so that we have a result with the following pattern: hash128(concatenate(routing field names)) + foreach(routing field value, limit = MAX_ROUTING_FIELDS) { hash32(routing field value) } + hash128(concatenate(routing field values)) The idea is to be able to place 'similar' values close to each other.decodeAsMap(org.apache.lucene.util.BytesRef bytesRef) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.index.mapper.RoutingFields
addString
-
Constructor Details
-
RoutingPathFields
-
-
Method Details
-
buildHash
Here we build the hash of the routing values using a similarity function so that we have a result with the following pattern: hash128(concatenate(routing field names)) + foreach(routing field value, limit = MAX_ROUTING_FIELDS) { hash32(routing field value) } + hash128(concatenate(routing field values)) The idea is to be able to place 'similar' values close to each other. -
addString
Description copied from interface:RoutingFieldsThis overloaded method tries to take advantage of the fact that the UTF-8 value is already computed in some cases when we want to collect routing fields, so we can save re-computing the UTF-8 encoding.- Specified by:
addStringin interfaceRoutingFields
-
addIp
- Specified by:
addIpin interfaceRoutingFields
-
addLong
- Specified by:
addLongin interfaceRoutingFields
-
addUnsignedLong
- Specified by:
addUnsignedLongin interfaceRoutingFields
-
addBoolean
- Specified by:
addBooleanin interfaceRoutingFields
-
decodeAsMap
-