-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ValueFacetResult.cs
37 lines (34 loc) · 1.46 KB
/
ValueFacetResult.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
namespace Microsoft.Azure.Search.Models
{
/// <summary>
/// A single bucket of a simple or interval facet query result that reports the number of documents with a field
/// falling within a particular interval or having a specific value.
/// </summary>
/// <typeparam name="T">
/// A type that matches the type of the field to which the facet was applied.
/// </typeparam>
public class ValueFacetResult<T>
{
/// <summary>
/// Creates a new instance of the <c cref="ValueFacetResult{T}">ValueFacetResult</c> class.
/// </summary>
/// <param name="count">The approximate count of documents falling within the bucket described by this facet.</param>
/// <param name="value">The value of the facet, or the inclusive lower bound if it's an interval facet.</param>
public ValueFacetResult(long count, T value)
{
Value = value;
Count = count;
}
/// <summary>
/// Gets the approximate count of documents falling within the bucket described by this facet.
/// </summary>
public long Count { get; }
/// <summary>
/// Gets the value of the facet, or the inclusive lower bound if it's an interval facet.
/// </summary>
public T Value { get; }
}
}