Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bbq index feature exposure for testing & remove feature flag #114832

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 0 additions & 2 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,6 @@ tests:
- class: org.elasticsearch.xpack.enrich.EnrichIT
method: testDeleteExistingPipeline
issue: https://github.com/elastic/elasticsearch/issues/114775
- class: org.elasticsearch.test.rest.ClientYamlTestSuiteIT
issue: https://github.com/elastic/elasticsearch/issues/114787
- class: org.elasticsearch.xpack.inference.rest.ServerSentEventsRestActionListenerTests
method: testNoStream
issue: https://github.com/elastic/elasticsearch/issues/114788
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
setup:
- requires:
cluster_features: "mapper.vectors.bbq"
capabilities:
- method: POST
path: /_search
capabilities: [ bbq_indices ]
test_runner_features: capabilities
reason: 'kNN float to better-binary quantization is required'
- do:
indices.create:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
setup:
- requires:
cluster_features: "mapper.vectors.bbq"
capabilities:
- method: POST
path: /_search
capabilities: [ bbq_indices ]
test_runner_features: capabilities
reason: 'kNN float to better-binary quantization is required'
- do:
indices.create:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

package org.elasticsearch.index.mapper;

import org.elasticsearch.common.util.set.Sets;
import org.elasticsearch.features.FeatureSpecification;
import org.elasticsearch.features.NodeFeature;
import org.elasticsearch.index.IndexSettings;
Expand All @@ -29,7 +28,7 @@ public class MapperFeatures implements FeatureSpecification {

@Override
public Set<NodeFeature> getFeatures() {
Set<NodeFeature> features = Set.of(
return Set.of(
BWC_WORKAROUND_9_0,
IgnoredSourceFieldMapper.TRACK_IGNORED_SOURCE,
PassThroughObjectMapper.PASS_THROUGH_PRIORITY,
Expand All @@ -55,11 +54,6 @@ public Set<NodeFeature> getFeatures() {
TimeSeriesRoutingHashFieldMapper.TS_ROUTING_HASH_FIELD_PARSES_BYTES_REF,
FlattenedFieldMapper.IGNORE_ABOVE_WITH_ARRAYS_SUPPORT
);
// BBQ is currently behind a feature flag for testing
if (DenseVectorFieldMapper.BBQ_FEATURE_FLAG.isEnabled()) {
return Sets.union(features, Set.of(DenseVectorFieldMapper.BBQ_FORMAT));
}
return features;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public static boolean isNotUnitVector(float magnitude) {

public static final NodeFeature INT4_QUANTIZATION = new NodeFeature("mapper.vectors.int4_quantization");
public static final NodeFeature BIT_VECTORS = new NodeFeature("mapper.vectors.bit_vectors");
public static final NodeFeature BBQ_FORMAT = new NodeFeature("mapper.vectors.bbq");
public static final FeatureFlag BBQ_FEATURE_FLAG = new FeatureFlag("bbq_index_format");

public static final IndexVersion MAGNITUDE_STORED_INDEX_VERSION = IndexVersions.V_7_5_0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@

package org.elasticsearch.rest.action.search;

import java.util.HashSet;
import java.util.Set;

import static org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapper.BBQ_FEATURE_FLAG;

/**
* A {@link Set} of "capabilities" supported by the {@link RestSearchAction}.
*/
Expand All @@ -22,9 +25,16 @@ private SearchCapabilities() {}
private static final String RANGE_REGEX_INTERVAL_QUERY_CAPABILITY = "range_regexp_interval_queries";
/** Support synthetic source with `bit` type in `dense_vector` field when `index` is set to `false`. */
private static final String BIT_DENSE_VECTOR_SYNTHETIC_SOURCE_CAPABILITY = "bit_dense_vector_synthetic_source";
private static final String BBQ_INDICES = "bbq_indices";

public static final Set<String> CAPABILITIES = Set.of(
RANGE_REGEX_INTERVAL_QUERY_CAPABILITY,
BIT_DENSE_VECTOR_SYNTHETIC_SOURCE_CAPABILITY
);
public static final Set<String> CAPABILITIES;
static {
HashSet<String> capabilities = new HashSet<>();
capabilities.add(RANGE_REGEX_INTERVAL_QUERY_CAPABILITY);
capabilities.add(BIT_DENSE_VECTOR_SYNTHETIC_SOURCE_CAPABILITY);
if (BBQ_FEATURE_FLAG.isEnabled()) {
capabilities.add(BBQ_INDICES);
}
CAPABILITIES = Set.copyOf(capabilities);
}
}