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, wait
Methods 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:RoutingFields
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.- Specified by:
addString
in interfaceRoutingFields
-
addIp
- Specified by:
addIp
in interfaceRoutingFields
-
addLong
- Specified by:
addLong
in interfaceRoutingFields
-
addUnsignedLong
- Specified by:
addUnsignedLong
in interfaceRoutingFields
-
addBoolean
- Specified by:
addBoolean
in interfaceRoutingFields
-
decodeAsMap
-