Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,6 @@ tests:
- class: org.elasticsearch.test.apmintegration.TracesApmIT
method: testApmIntegration
issue: https://github.com/elastic/elasticsearch/issues/129651
- class: org.elasticsearch.search.query.RescoreKnnVectorQueryIT
method: testKnnSearchRescore
issue: https://github.com/elastic/elasticsearch/issues/129713
- class: org.elasticsearch.snapshots.SnapshotShutdownIT
method: testSnapshotShutdownProgressTracker
issue: https://github.com/elastic/elasticsearch/issues/129752
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,20 @@
import org.junit.Before;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.stream.Collectors;

import static org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapper.IVF_FORMAT;
import static org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapper.VectorIndexType.BBQ_IVF;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailuresAndResponse;
import static org.hamcrest.Matchers.equalTo;
Expand Down Expand Up @@ -83,12 +86,14 @@ protected Map<String, Function<Map<String, Object>, Object>> pluginScripts() {

@Before
public void setup() throws IOException {
String type = randomFrom(
Arrays.stream(VectorIndexType.values())
.filter(VectorIndexType::isQuantized)
.map(t -> t.name().toLowerCase(Locale.ROOT))
.collect(Collectors.toCollection(ArrayList::new))
);
Set<String> validIndexTypes = Arrays.stream(VectorIndexType.values())
.filter(VectorIndexType::isQuantized)
.map(t -> t.name().toLowerCase(Locale.ROOT))
.collect(Collectors.toCollection(HashSet::new));
if (IVF_FORMAT.isEnabled() == false) {
validIndexTypes.remove(BBQ_IVF.name().toLowerCase(Locale.ROOT));
}
String type = randomFrom(validIndexTypes);
XContentBuilder mapping = XContentFactory.jsonBuilder()
.startObject()
.startObject("properties")
Expand Down