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 cluster level dense vector stats #107962

Merged
merged 10 commits into from
Jun 18, 2024
Merged
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
4 changes: 4 additions & 0 deletions docs/reference/rest-api/common-parms.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ Return all statistics.
`completion`::
<<completion-suggester,Completion suggester>> statistics.

`dense_vector`::
Total number of dense vectors indexed.
<<indices-refresh,Index refreshes>> can affect this statistic.

`docs`::
Number of documents, number of deleted docs which have not yet merged out, and total size in bytes.
<<indices-refresh,Index refreshes>> can affect this statistic.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,12 @@
---
"Dense vector stats":
- requires:
cluster_features: [ "gte_v8.10.0" ]
reason: "dense vector stats added in 8.10"
cluster_features: [ "gte_v8.15.0" ]
reason: "dense vector stats reports from primary indices in 8.15"
- do:
indices.create:
index: test1
body:
settings:
number_of_replicas: 0
mappings:
properties:
vector:
Expand All @@ -283,8 +281,6 @@
indices.create:
index: test2
body:
settings:
number_of_replicas: 0
mappings:
properties:
vector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ public ClusterStatsIndices(
if (shardStats.getShardRouting().primary()) {
indexShardStats.primaries++;
docs.add(shardCommonStats.getDocs());
denseVectorStats.add(shardCommonStats.getDenseVectorStats());
sparseVectorStats.add(shardCommonStats.getSparseVectorStats());
}
store.add(shardCommonStats.getStore());
fieldData.add(shardCommonStats.getFieldData());
queryCache.add(shardCommonStats.getQueryCache());
completion.add(shardCommonStats.getCompletion());
segments.add(shardCommonStats.getSegments());
denseVectorStats.add(shardCommonStats.getDenseVectorStats());
}

searchUsageStats.add(r.searchUsageStats());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ protected Table getTableWithHeader(final RestRequest request) {
);
table.addCell(
"dense_vector.value_count",
"alias:dvc,denseVectorCount;default:false;text-align:right;desc:total count of indexed dense vector"
"alias:dvc,denseVectorCount;default:false;text-align:right;desc:number of indexed dense vectors in shard"
);
table.addCell(
"sparse_vector.value_count",
Expand Down