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