| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Collections.Generic; |
| | 10 | | using System.Linq; |
| | 11 | | using Azure.Core; |
| | 12 | | using Azure.Search.Documents; |
| | 13 | |
|
| | 14 | | namespace Azure.Search.Documents.Models |
| | 15 | | { |
| | 16 | | /// <summary> Response containing search results from an index. </summary> |
| | 17 | | internal partial class SearchDocumentsResult |
| | 18 | | { |
| | 19 | | /// <summary> Initializes a new instance of SearchDocumentsResult. </summary> |
| | 20 | | /// <param name="results"> The sequence of results returned by the query. </param> |
| | 21 | | /// <exception cref="ArgumentNullException"> <paramref name="results"/> is null. </exception> |
| 0 | 22 | | internal SearchDocumentsResult(IEnumerable<SearchResult> results) |
| | 23 | | { |
| 0 | 24 | | if (results == null) |
| | 25 | | { |
| 0 | 26 | | throw new ArgumentNullException(nameof(results)); |
| | 27 | | } |
| | 28 | |
|
| 0 | 29 | | Facets = new ChangeTrackingDictionary<string, IList<FacetResult>>(); |
| 0 | 30 | | Results = results.ToList(); |
| 0 | 31 | | } |
| | 32 | |
|
| | 33 | | /// <summary> Initializes a new instance of SearchDocumentsResult. </summary> |
| | 34 | | /// <param name="count"> The total count of results found by the search operation, or null if the count was not |
| | 35 | | /// <param name="coverage"> A value indicating the percentage of the index that was included in the query, or nu |
| | 36 | | /// <param name="facets"> The facet query results for the search operation, organized as a collection of buckets |
| | 37 | | /// <param name="nextPageParameters"> Continuation JSON payload returned when Azure Cognitive Search can't |
| | 38 | | /// <param name="results"> The sequence of results returned by the query. </param> |
| | 39 | | /// <param name="nextLink"> Continuation URL returned when Azure Cognitive Search can't return all the requ |
| 0 | 40 | | internal SearchDocumentsResult(long? count, double? coverage, IReadOnlyDictionary<string, IList<FacetResult>> fa |
| | 41 | | { |
| 0 | 42 | | Count = count; |
| 0 | 43 | | Coverage = coverage; |
| 0 | 44 | | Facets = facets; |
| 0 | 45 | | NextPageParameters = nextPageParameters; |
| 0 | 46 | | Results = results; |
| 0 | 47 | | NextLink = nextLink; |
| 0 | 48 | | } |
| | 49 | |
|
| | 50 | | /// <summary> The total count of results found by the search operation, or null if the count was not requested. |
| 0 | 51 | | public long? Count { get; } |
| | 52 | | /// <summary> A value indicating the percentage of the index that was included in the query, or null if minimumC |
| 0 | 53 | | public double? Coverage { get; } |
| | 54 | | /// <summary> The facet query results for the search operation, organized as a collection of buckets for each fa |
| 0 | 55 | | public IReadOnlyDictionary<string, IList<FacetResult>> Facets { get; } |
| | 56 | | /// <summary> Continuation JSON payload returned when Azure Cognitive Search can't return all the requested |
| 0 | 57 | | public SearchOptions NextPageParameters { get; } |
| | 58 | | /// <summary> The sequence of results returned by the query. </summary> |
| 0 | 59 | | public IReadOnlyList<SearchResult> Results { get; } |
| | 60 | | /// <summary> Continuation URL returned when Azure Cognitive Search can't return all the requested results |
| 0 | 61 | | public string NextLink { get; } |
| | 62 | | } |
| | 63 | | } |