Skip to content

Commit 7a24703

Browse files
committed
use default prune config if prune=true and not set
1 parent 3086a4b commit 7a24703

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ public static Boolean parseIndexOptionsPruneValue(Map<String, Object> indexOptio
516516
public static PruningConfig parseIndexOptionsPruningConfig(Boolean prune, Map<String, Object> indexOptionsMap) {
517517
Object pruningConfiguration = indexOptionsMap.remove(IndexOptions.PRUNING_CONFIG_FIELD_NAME);
518518
if (pruningConfiguration == null) {
519-
return null;
519+
return new PruningConfig(PruningConfig.DEFAULT_TOKENS_FREQ_RATIO_THRESHOLD, PruningConfig.DEFAULT_TOKENS_WEIGHT_THRESHOLD);
520520
}
521521
if ((pruningConfiguration instanceof Map) == false) {
522522
throw new MapperParsingException("[index_options] field [pruning_config] should be a map");

0 commit comments

Comments
 (0)