Class QueryIndexBody
The request body for querying an index
Inherited Members
Namespace: Unity.Services.Apis.Admin.CloudSave
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "QueryIndexBody")]
[Preserve]
public class QueryIndexBody
Constructors
QueryIndexBody(List<FieldFilter>, List<string>, int, int, int)
Initializes a new instance of the QueryIndexBody class.
Declaration
[Preserve]
public QueryIndexBody(List<FieldFilter> fields = null, List<string> returnKeys = null, int offset = 0, int limit = 0, int sampleSize = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| List<FieldFilter> | fields | fields (required). |
| List<string> | returnKeys | The keys to return in the response. This can include keys not on the index. If not specified or empty, the data on the results will be empty for any returned entities.. |
| int | offset | The number of results to skip. Defaults to 0.. |
| int | limit | The maximum number of results to return. Defaults to 10. Specifying 0 will return the default number of results.. |
| int | sampleSize | If set, the given number of random items will be chosen from the total query results and returned as a sample. Defaults to null.. |
Properties
Fields
Gets or Sets Fields
Declaration
[DataMember(Name = "fields", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public List<FieldFilter> Fields { get; set; }
Property Value
| Type | Description |
|---|---|
| List<FieldFilter> |
Limit
The maximum number of results to return. Defaults to 10. Specifying 0 will return the default number of results.
Declaration
[DataMember(Name = "limit", EmitDefaultValue = false)]
[Preserve]
public int Limit { get; set; }
Property Value
| Type | Description |
|---|---|
| int | The maximum number of results to return. Defaults to 10. Specifying 0 will return the default number of results. |
Offset
The number of results to skip. Defaults to 0.
Declaration
[DataMember(Name = "offset", EmitDefaultValue = false)]
[Preserve]
public int Offset { get; set; }
Property Value
| Type | Description |
|---|---|
| int | The number of results to skip. Defaults to 0. |
ReturnKeys
The keys to return in the response. This can include keys not on the index. If not specified or empty, the data on the results will be empty for any returned entities.
Declaration
[DataMember(Name = "returnKeys", EmitDefaultValue = false)]
[Preserve]
public List<string> ReturnKeys { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> | The keys to return in the response. This can include keys not on the index. If not specified or empty, the data on the results will be empty for any returned entities. |
SampleSize
If set, the given number of random items will be chosen from the total query results and returned as a sample. Defaults to null.
Declaration
[DataMember(Name = "sampleSize", EmitDefaultValue = false)]
[Preserve]
public int SampleSize { get; set; }
Property Value
| Type | Description |
|---|---|
| int | If set, the given number of random items will be chosen from the total query results and returned as a sample. Defaults to null. |