diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/TsidBuilder.java b/server/src/main/java/org/elasticsearch/cluster/routing/TsidBuilder.java index d29dced2adb28..8ca2f095d0d72 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/TsidBuilder.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/TsidBuilder.java @@ -31,7 +31,12 @@ */ public class TsidBuilder { - private static final int MAX_TSID_VALUE_FIELDS = 16; + /** + * The maximum number of fields to use for the value similarity part of the TSID. + * This is a trade-off between clustering similar time series together and the size of the TSID. + * More fields improve clustering but also increase the size of the TSID. + */ + private static final int MAX_TSID_VALUE_SIMILARITY_FIELDS = 4; private final BufferedMurmur3Hasher murmur3Hasher = new BufferedMurmur3Hasher(0L); private final List dimensions = new ArrayList<>(); @@ -209,11 +214,11 @@ public MurmurHash3.Hash128 hash() { * The TSID is a hash that includes: *