Skip to content

Remove vectors from _source transparently #130382

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

Merged
merged 26 commits into from
Jul 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
746a233
Introduce a new setting and a feature flag for the synthetic vectors …
jimczi Jul 1, 2025
309e4c3
Introduce a synthetic vectors source loader and a synthetic vectors f…
jimczi Jul 1, 2025
9bfea9c
Handle the new setting in search and get api to exclude vectors when …
jimczi Jul 1, 2025
6c584e9
handle recovery and translog when synthetic vectors is on
jimczi Jul 1, 2025
9357340
Add support for synthetic vectors in dense vector field mapper
jimczi Jul 1, 2025
4ff2123
Update docs/changelog/130382.yaml
jimczi Jul 1, 2025
883af2c
Merge branch 'main' into synthetic_vectors
jimczi Jul 1, 2025
62c98c3
Propagate feature flag where it's needed
jimczi Jul 1, 2025
ba65346
Merge remote-tracking branch 'origin/synthetic_vectors' into syntheti…
jimczi Jul 1, 2025
fa02743
add yml tests for partial updates and get API
jimczi Jul 1, 2025
e419b76
Merge remote-tracking branch 'upstream/main' into synthetic_vectors
jimczi Jul 1, 2025
56d7b75
fix propagation of leaf reader
jimczi Jul 1, 2025
52d9278
fix RcsCcsCommonYamlTestSuiteIT
jimczi Jul 1, 2025
1d64c86
add yaml tests with the fields option and patch the vectors as list t…
jimczi Jul 1, 2025
bacc3fe
Merge remote-tracking branch 'upstream/main' into synthetic_vectors
jimczi Jul 1, 2025
bf61ed2
Merge branch 'main' into synthetic_vectors
jimczi Jul 2, 2025
9b383d3
Merge remote-tracking branch 'upstream/main' into synthetic_vectors
jimczi Jul 2, 2025
6cdf89b
empty line
jimczi Jul 2, 2025
439dae1
Merge branch 'main' into synthetic_vectors
jimczi Jul 3, 2025
6554aee
Update 130382.yaml
jimczi Jul 4, 2025
27c3a3b
apply review comments
jimczi Jul 4, 2025
5845c27
Add comments and make the code more readable
jimczi Jul 4, 2025
26ab174
Merge remote-tracking branch 'upstream/main' into synthetic_vectors
jimczi Jul 4, 2025
efaf6bd
Merge branch 'main' into synthetic_vectors
jimczi Jul 4, 2025
f0cbd8b
Merge remote-tracking branch 'upstream/main' into synthetic_vectors
jimczi Jul 7, 2025
e494584
Merge remote-tracking branch 'origin/synthetic_vectors' into syntheti…
jimczi Jul 7, 2025
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
5 changes: 5 additions & 0 deletions docs/changelog/130382.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 130382
summary: Remove vectors from `_source` transparently
area: "Vector Search"
type: enhancement
issues: []
2 changes: 1 addition & 1 deletion qa/ccs-common-rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ apply plugin: 'elasticsearch.internal-yaml-rest-test'
restResources {
restApi {
include 'capabilities', 'cat.shards', '_common', 'bulk', 'count', 'cluster', 'field_caps', 'get', 'knn_search', 'index', 'indices', 'msearch',
"nodes.stats", 'search', 'async_search', 'graph', '*_point_in_time', 'info', 'scroll', 'clear_scroll', 'search_mvt', 'eql', 'sql'
"nodes.stats", 'search', 'async_search', 'graph', '*_point_in_time', 'info', 'scroll', 'clear_scroll', 'search_mvt', 'eql', 'sql', 'update'
}
restTests {
includeCore 'field_caps', 'msearch', 'search', 'suggest', 'scroll', "indices.resolve_index"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public class CcsCommonYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
.setting("xpack.license.self_generated.type", "trial")
.feature(FeatureFlag.TIME_SERIES_MODE)
.feature(FeatureFlag.SUB_OBJECTS_AUTO_ENABLED)
.feature(FeatureFlag.IVF_FORMAT);
.feature(FeatureFlag.IVF_FORMAT)
.feature(FeatureFlag.SYNTHETIC_VECTORS);

private static ElasticsearchCluster remoteCluster = ElasticsearchCluster.local()
.name(REMOTE_CLUSTER_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public class RcsCcsCommonYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
.feature(FeatureFlag.TIME_SERIES_MODE)
.feature(FeatureFlag.SUB_OBJECTS_AUTO_ENABLED)
.feature(FeatureFlag.IVF_FORMAT)
.feature(FeatureFlag.SYNTHETIC_VECTORS)
.user("test_admin", "x-pack-test-password");

private static ElasticsearchCluster fulfillingCluster = ElasticsearchCluster.local()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class SmokeTestMultiNodeClientYamlTestSuiteIT extends ESClientYamlSuiteTe
.feature(FeatureFlag.DOC_VALUES_SKIPPER)
.feature(FeatureFlag.USE_LUCENE101_POSTINGS_FORMAT)
.feature(FeatureFlag.IVF_FORMAT)
.feature(FeatureFlag.SYNTHETIC_VECTORS)
.build();

public SmokeTestMultiNodeClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
Expand Down
4 changes: 4 additions & 0 deletions rest-api-spec/src/main/resources/rest-api-spec/api/get.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
"type":"list",
"description":"A list of fields to extract and return from the _source field"
},
"_source_exclude_vectors":{
"type":"boolean",
"description":"Whether vectors should be excluded from _source"
},
"version":{
"type":"number",
"description":"Explicit version number for concurrency control"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@
"type":"list",
"description":"A list of fields to extract and return from the _source field"
},
"_source_exclude_vectors":{
"type":"boolean",
"description":"Whether vectors should be excluded from _source"
},
"terminate_after":{
"type":"number",
"description":"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class ClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
.feature(FeatureFlag.DOC_VALUES_SKIPPER)
.feature(FeatureFlag.USE_LUCENE101_POSTINGS_FORMAT)
.feature(FeatureFlag.IVF_FORMAT)
.feature(FeatureFlag.SYNTHETIC_VECTORS)
.build();

public ClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
Expand Down
Loading
Loading