Skip to content

Commit 7ceb12a

Browse files
committed
fix test
1 parent 7a24703 commit 7ceb12a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/test/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapperTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ public void testDefaults() throws Exception {
150150

151151
public void testWithIndexOptionsPrune() throws Exception {
152152
DocumentMapper mapper = createDocumentMapper(fieldMapping(this::mappingWithIndexOptionsPrune));
153-
assertEquals(Strings.toString(fieldMapping(this::mappingWithIndexOptionsPrune)), mapper.mappingSource().toString());
153+
String expectedMapping = "{\"_doc\":{\"properties\":{\"field\":{\"type\":\"sparse_vector\",\"index_options\":{\"prune\":true,\"pruning_config\":{\"tokens_freq_ratio_threshold\":5.0,\"tokens_weight_threshold\":0.4}}}}}}"
154+
assertEquals(expectedMapping, mapper.mappingSource().toString());
154155

155156
ParsedDocument doc1 = mapper.parse(source(this::writeField));
156157

0 commit comments

Comments
 (0)