| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.Search.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using System.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Linq; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Parameters for filtering, sorting, fuzzy matching, and other suggestions query behaviors. |
| | 20 | | /// </summary> |
| | 21 | | public partial class SuggestParameters |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the SuggestParameters class. |
| | 25 | | /// </summary> |
| 82 | 26 | | public SuggestParameters() |
| | 27 | | { |
| | 28 | | CustomInit(); |
| 82 | 29 | | } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Initializes a new instance of the SuggestParameters class. |
| | 33 | | /// </summary> |
| | 34 | | /// <param name="filter">An OData expression that filters the documents |
| | 35 | | /// considered for suggestions.</param> |
| | 36 | | /// <param name="useFuzzyMatching">A value indicating whether to use |
| | 37 | | /// fuzzy matching for the suggestions query. Default is false. When |
| | 38 | | /// set to true, the query will find terms even if there's a |
| | 39 | | /// substituted or missing character in the search text. While this |
| | 40 | | /// provides a better experience in some scenarios, it comes at a |
| | 41 | | /// performance cost as fuzzy suggestions queries are slower and |
| | 42 | | /// consume more resources.</param> |
| | 43 | | /// <param name="highlightPostTag">A string tag that is appended to hit |
| | 44 | | /// highlights. Must be set with highlightPreTag. If omitted, hit |
| | 45 | | /// highlighting of suggestions is disabled.</param> |
| | 46 | | /// <param name="highlightPreTag">A string tag that is prepended to hit |
| | 47 | | /// highlights. Must be set with highlightPostTag. If omitted, hit |
| | 48 | | /// highlighting of suggestions is disabled.</param> |
| | 49 | | /// <param name="minimumCoverage">A number between 0 and 100 indicating |
| | 50 | | /// the percentage of the index that must be covered by a suggestions |
| | 51 | | /// query in order for the query to be reported as a success. This |
| | 52 | | /// parameter can be useful for ensuring search availability even for |
| | 53 | | /// services with only one replica. The default is 80.</param> |
| | 54 | | /// <param name="orderBy">The list of OData $orderby expressions by |
| | 55 | | /// which to sort the results. Each expression can be either a field |
| | 56 | | /// name or a call to either the geo.distance() or the search.score() |
| | 57 | | /// functions. Each expression can be followed by asc to indicate |
| | 58 | | /// ascending, or desc to indicate descending. The default is ascending |
| | 59 | | /// order. Ties will be broken by the match scores of documents. If no |
| | 60 | | /// $orderby is specified, the default sort order is descending by |
| | 61 | | /// document match score. There can be at most 32 $orderby |
| | 62 | | /// clauses.</param> |
| | 63 | | /// <param name="searchFields">The list of field names to search for |
| | 64 | | /// the specified search text. Target fields must be included in the |
| | 65 | | /// specified suggester.</param> |
| | 66 | | /// <param name="select">The list of fields to retrieve. If |
| | 67 | | /// unspecified, only the key field will be included in the |
| | 68 | | /// results.</param> |
| | 69 | | /// <param name="top">The number of suggestions to retrieve. The value |
| | 70 | | /// must be a number between 1 and 100. The default is 5.</param> |
| 0 | 71 | | public SuggestParameters(string filter = default(string), bool useFuzzyMatching = default(bool), string highligh |
| | 72 | | { |
| 0 | 73 | | Filter = filter; |
| 0 | 74 | | UseFuzzyMatching = useFuzzyMatching; |
| 0 | 75 | | HighlightPostTag = highlightPostTag; |
| 0 | 76 | | HighlightPreTag = highlightPreTag; |
| 0 | 77 | | MinimumCoverage = minimumCoverage; |
| 0 | 78 | | OrderBy = orderBy; |
| 0 | 79 | | SearchFields = searchFields; |
| 0 | 80 | | Select = select; |
| 0 | 81 | | Top = top; |
| | 82 | | CustomInit(); |
| 0 | 83 | | } |
| | 84 | |
|
| | 85 | | /// <summary> |
| | 86 | | /// An initialization method that performs custom operations like setting defaults |
| | 87 | | /// </summary> |
| | 88 | | partial void CustomInit(); |
| | 89 | |
|
| | 90 | | /// <summary> |
| | 91 | | /// Gets or sets an OData expression that filters the documents |
| | 92 | | /// considered for suggestions. |
| | 93 | | /// </summary> |
| | 94 | | [Newtonsoft.Json.JsonIgnore] |
| 98 | 95 | | public string Filter { get; set; } |
| | 96 | |
|
| | 97 | | /// <summary> |
| | 98 | | /// Gets or sets a value indicating whether to use fuzzy matching for |
| | 99 | | /// the suggestions query. Default is false. When set to true, the |
| | 100 | | /// query will find terms even if there's a substituted or missing |
| | 101 | | /// character in the search text. While this provides a better |
| | 102 | | /// experience in some scenarios, it comes at a performance cost as |
| | 103 | | /// fuzzy suggestions queries are slower and consume more resources. |
| | 104 | | /// </summary> |
| | 105 | | [Newtonsoft.Json.JsonIgnore] |
| 94 | 106 | | public bool UseFuzzyMatching { get; set; } |
| | 107 | |
|
| | 108 | | /// <summary> |
| | 109 | | /// Gets or sets a string tag that is appended to hit highlights. Must |
| | 110 | | /// be set with highlightPreTag. If omitted, hit highlighting of |
| | 111 | | /// suggestions is disabled. |
| | 112 | | /// </summary> |
| | 113 | | [Newtonsoft.Json.JsonIgnore] |
| 94 | 114 | | public string HighlightPostTag { get; set; } |
| | 115 | |
|
| | 116 | | /// <summary> |
| | 117 | | /// Gets or sets a string tag that is prepended to hit highlights. Must |
| | 118 | | /// be set with highlightPostTag. If omitted, hit highlighting of |
| | 119 | | /// suggestions is disabled. |
| | 120 | | /// </summary> |
| | 121 | | [Newtonsoft.Json.JsonIgnore] |
| 94 | 122 | | public string HighlightPreTag { get; set; } |
| | 123 | |
|
| | 124 | | /// <summary> |
| | 125 | | /// Gets or sets a number between 0 and 100 indicating the percentage |
| | 126 | | /// of the index that must be covered by a suggestions query in order |
| | 127 | | /// for the query to be reported as a success. This parameter can be |
| | 128 | | /// useful for ensuring search availability even for services with only |
| | 129 | | /// one replica. The default is 80. |
| | 130 | | /// </summary> |
| | 131 | | [Newtonsoft.Json.JsonIgnore] |
| 94 | 132 | | public double? MinimumCoverage { get; set; } |
| | 133 | |
|
| | 134 | | /// <summary> |
| | 135 | | /// Gets or sets the list of OData $orderby expressions by which to |
| | 136 | | /// sort the results. Each expression can be either a field name or a |
| | 137 | | /// call to either the geo.distance() or the search.score() functions. |
| | 138 | | /// Each expression can be followed by asc to indicate ascending, or |
| | 139 | | /// desc to indicate descending. The default is ascending order. Ties |
| | 140 | | /// will be broken by the match scores of documents. If no $orderby is |
| | 141 | | /// specified, the default sort order is descending by document match |
| | 142 | | /// score. There can be at most 32 $orderby clauses. |
| | 143 | | /// </summary> |
| | 144 | | [Newtonsoft.Json.JsonIgnore] |
| 114 | 145 | | public IList<string> OrderBy { get; set; } |
| | 146 | |
|
| | 147 | | /// <summary> |
| | 148 | | /// Gets or sets the list of field names to search for the specified |
| | 149 | | /// search text. Target fields must be included in the specified |
| | 150 | | /// suggester. |
| | 151 | | /// </summary> |
| | 152 | | [Newtonsoft.Json.JsonIgnore] |
| 94 | 153 | | public IList<string> SearchFields { get; set; } |
| | 154 | |
|
| | 155 | | /// <summary> |
| | 156 | | /// Gets or sets the list of fields to retrieve. If unspecified, only |
| | 157 | | /// the key field will be included in the results. |
| | 158 | | /// </summary> |
| | 159 | | [Newtonsoft.Json.JsonIgnore] |
| 224 | 160 | | public IList<string> Select { get; set; } |
| | 161 | |
|
| | 162 | | /// <summary> |
| | 163 | | /// Gets or sets the number of suggestions to retrieve. The value must |
| | 164 | | /// be a number between 1 and 100. The default is 5. |
| | 165 | | /// </summary> |
| | 166 | | [Newtonsoft.Json.JsonIgnore] |
| 98 | 167 | | public int? Top { get; set; } |
| | 168 | |
|
| | 169 | | } |
| | 170 | | } |