-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ValueFacetResult.cs
48 lines (44 loc) · 1.49 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
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
namespace Azure.Search.Documents.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>
/// 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; }
/// <summary>
/// Creates a new instance of the ValueFacetResult 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;
}
}
}