Skip to content

Implement vector usage #4151

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 1 commit into from
Oct 17, 2019
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
14 changes: 13 additions & 1 deletion src/Nest/XPack/Info/XPackUsage/XPackUsageResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class XPackUsageResponse : ResponseBase
public SecurityUsage Security { get; internal set; }

[DataMember(Name = "vectors")]
public XPackUsage Vectors { get; internal set; }
public VectorUsage Vectors { get; internal set; }

[DataMember(Name = "voting_only")]
public XPackUsage VotingOnly { get; internal set; }
Expand All @@ -91,6 +91,18 @@ public class XPackUsage
public bool Enabled { get; internal set; }
}

public class VectorUsage : XPackUsage
{
[DataMember(Name = "dense_vector_fields_count")]
public int DenseVectorFieldsCount { get; internal set; }

[DataMember(Name = "sparse_vector_fields_count")]
public int SparseVectorFieldsCount { get; internal set; }

[DataMember(Name = "dense_vector_dims_avg_count")]
public int DenseVectorDimensionsAverageCount { get; internal set; }
}

public class SecurityUsage : XPackUsage
{
[DataMember(Name = "anonymous")]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Tests/XPack/Info/XPackInfoApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ [I] public async Task XPackUsageResponse() => await Assert<XPackUsageResponse>(X
r.Flattened.Should().NotBeNull();
r.DataFrame.Should().NotBeNull();
r.Vectors.Should().NotBeNull();
r.VotingOnly.Should().NotBeNull();
r.VotingOnly.Should().NotBeNull();
}
});
}
Expand Down