Skip to content

Conversation

@carlosdelest
Copy link
Member

@carlosdelest carlosdelest commented Jul 30, 2025

Docs indexation didn't wait for the index request to return, which caused doc count to fail in some instances.

Closes quite a few issues, as this is a parameterized test that checks all combinations of index upgrades.

Closes #132165
Closes #132164
Closes #132152
Closes #132151
Closes #132150
Closes #132149
Closes #132141
Closes #132140
Closes #132134
Closes #132133
Closes #132132
Closes #132130
Closes #132127
Closes #132126
Closes #132125
Closes #132124
Closes #132123
Closes #132122
Closes #132121
Closes #132120
Closes #132119
Closes #132117
Closes #132116
Closes #132115
Closes #132113
Closes #132112
Closes #132234
Closes #132228
Closes #132222
Closes #132221
Closes #132220
Closes #132219
Closes #132214
Closes #132213
Closes #132211
Closes #132189
Closes #132188

@carlosdelest carlosdelest added >test Issues or PRs that are addressing/adding tests :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.2.0 labels Jul 30, 2025
assertNoFailuresAndResponse(client().prepareSearch(INDEX_NAME).setSize(expectedDocs + 10), response -> {

// Count query
assertNoFailuresAndResponse(client().prepareSearch(INDEX_NAME).setSize(0).setTrackTotalHits(true).setSize(expectedDocs), response -> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a count query as well as a knn query to ensure results are consistent

private void indexDoc(int id) throws ExecutionException, InterruptedException {
Float[] vector = randomArray(dimensions, dimensions, Float[]::new, () -> randomFloatBetween(-1, 1, true));
IndexRequest req = prepareIndex(INDEX_NAME).setSource(VECTOR_FIELD, vector).setId(Integer.toString(id)).request();
client().index(req);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

@carlosdelest carlosdelest marked this pull request as ready for review July 30, 2025 15:59
@carlosdelest carlosdelest requested a review from a team July 30, 2025 16:00
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

Copy link
Contributor

@john-wagster john-wagster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm insane number of issues created ha

…r-update-tests

# Conflicts:
#	muted-tests.yml
…ate-tests' into tests/fix-dense-vector-update-tests

# Conflicts:
#	muted-tests.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch >test Issues or PRs that are addressing/adding tests v9.2.0

Projects

None yet

3 participants