| | 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, faceting, paging, and other search query behaviors. |
| | 20 | | /// </summary> |
| | 21 | | public partial class SearchParameters |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the SearchParameters class. |
| | 25 | | /// </summary> |
| 156 | 26 | | public SearchParameters() |
| | 27 | | { |
| | 28 | | CustomInit(); |
| 156 | 29 | | } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Initializes a new instance of the SearchParameters class. |
| | 33 | | /// </summary> |
| | 34 | | /// <param name="includeTotalResultCount">A value that specifies |
| | 35 | | /// whether to fetch the total count of results. Default is false. |
| | 36 | | /// Setting this value to true may have a performance impact. Note that |
| | 37 | | /// the count returned is an approximation.</param> |
| | 38 | | /// <param name="facets">The list of facet expressions to apply to the |
| | 39 | | /// search query. Each facet expression contains a field name, |
| | 40 | | /// optionally followed by a comma-separated list of name:value |
| | 41 | | /// pairs.</param> |
| | 42 | | /// <param name="filter">The OData $filter expression to apply to the |
| | 43 | | /// search query.</param> |
| | 44 | | /// <param name="highlightFields">The list of field names to use for |
| | 45 | | /// hit highlights. Only searchable fields can be used for hit |
| | 46 | | /// highlighting.</param> |
| | 47 | | /// <param name="highlightPostTag">A string tag that is appended to hit |
| | 48 | | /// highlights. Must be set with highlightPreTag. Default is |
| | 49 | | /// &lt;/em&gt;.</param> |
| | 50 | | /// <param name="highlightPreTag">A string tag that is prepended to hit |
| | 51 | | /// highlights. Must be set with highlightPostTag. Default is |
| | 52 | | /// &lt;em&gt;.</param> |
| | 53 | | /// <param name="minimumCoverage">A number between 0 and 100 indicating |
| | 54 | | /// the percentage of the index that must be covered by a search query |
| | 55 | | /// in order for the query to be reported as a success. This parameter |
| | 56 | | /// can be useful for ensuring search availability even for services |
| | 57 | | /// with only one replica. The default is 100.</param> |
| | 58 | | /// <param name="orderBy">The list of OData $orderby expressions by |
| | 59 | | /// which to sort the results. Each expression can be either a field |
| | 60 | | /// name or a call to either the geo.distance() or the search.score() |
| | 61 | | /// functions. Each expression can be followed by asc to indicate |
| | 62 | | /// ascending, and desc to indicate descending. The default is |
| | 63 | | /// ascending order. Ties will be broken by the match scores of |
| | 64 | | /// documents. If no OrderBy is specified, the default sort order is |
| | 65 | | /// descending by document match score. There can be at most 32 |
| | 66 | | /// $orderby clauses.</param> |
| | 67 | | /// <param name="queryType">A value that specifies the syntax of the |
| | 68 | | /// search query. The default is 'simple'. Use 'full' if your query |
| | 69 | | /// uses the Lucene query syntax. Possible values include: 'simple', |
| | 70 | | /// 'full'</param> |
| | 71 | | /// <param name="scoringParameters">The list of parameter values to be |
| | 72 | | /// used in scoring functions (for example, referencePointParameter) |
| | 73 | | /// using the format name-values. For example, if the scoring profile |
| | 74 | | /// defines a function with a parameter called 'mylocation' the |
| | 75 | | /// parameter string would be "mylocation--122.2,44.8" (without the |
| | 76 | | /// quotes).</param> |
| | 77 | | /// <param name="scoringProfile">The name of a scoring profile to |
| | 78 | | /// evaluate match scores for matching documents in order to sort the |
| | 79 | | /// results.</param> |
| | 80 | | /// <param name="searchFields">The list of field names to which to |
| | 81 | | /// scope the full-text search. When using fielded search |
| | 82 | | /// (fieldName:searchExpression) in a full Lucene query, the field |
| | 83 | | /// names of each fielded search expression take precedence over any |
| | 84 | | /// field names listed in this parameter.</param> |
| | 85 | | /// <param name="searchMode">A value that specifies whether any or all |
| | 86 | | /// of the search terms must be matched in order to count the document |
| | 87 | | /// as a match. Possible values include: 'any', 'all'</param> |
| | 88 | | /// <param name="select">The list of fields to retrieve. If |
| | 89 | | /// unspecified, all fields marked as retrievable in the schema are |
| | 90 | | /// included.</param> |
| | 91 | | /// <param name="skip">The number of search results to skip. This value |
| | 92 | | /// cannot be greater than 100,000. If you need to scan documents in |
| | 93 | | /// sequence, but cannot use $skip due to this limitation, consider |
| | 94 | | /// using $orderby on a totally-ordered key and $filter with a range |
| | 95 | | /// query instead.</param> |
| | 96 | | /// <param name="top">The number of search results to retrieve. This |
| | 97 | | /// can be used in conjunction with $skip to implement client-side |
| | 98 | | /// paging of search results. If results are truncated due to |
| | 99 | | /// server-side paging, the response will include a continuation token |
| | 100 | | /// that can be used to issue another Search request for the next page |
| | 101 | | /// of results.</param> |
| 0 | 102 | | public SearchParameters(bool includeTotalResultCount = default(bool), IList<string> facets = default(IList<strin |
| | 103 | | { |
| 0 | 104 | | IncludeTotalResultCount = includeTotalResultCount; |
| 0 | 105 | | Facets = facets; |
| 0 | 106 | | Filter = filter; |
| 0 | 107 | | HighlightFields = highlightFields; |
| 0 | 108 | | HighlightPostTag = highlightPostTag; |
| 0 | 109 | | HighlightPreTag = highlightPreTag; |
| 0 | 110 | | MinimumCoverage = minimumCoverage; |
| 0 | 111 | | OrderBy = orderBy; |
| 0 | 112 | | QueryType = queryType; |
| 0 | 113 | | ScoringParameters = scoringParameters; |
| 0 | 114 | | ScoringProfile = scoringProfile; |
| 0 | 115 | | SearchFields = searchFields; |
| 0 | 116 | | SearchMode = searchMode; |
| 0 | 117 | | Select = select; |
| 0 | 118 | | Skip = skip; |
| 0 | 119 | | Top = top; |
| | 120 | | CustomInit(); |
| 0 | 121 | | } |
| | 122 | |
|
| | 123 | | /// <summary> |
| | 124 | | /// An initialization method that performs custom operations like setting defaults |
| | 125 | | /// </summary> |
| | 126 | | partial void CustomInit(); |
| | 127 | |
|
| | 128 | | /// <summary> |
| | 129 | | /// Gets or sets a value that specifies whether to fetch the total |
| | 130 | | /// count of results. Default is false. Setting this value to true may |
| | 131 | | /// have a performance impact. Note that the count returned is an |
| | 132 | | /// approximation. |
| | 133 | | /// </summary> |
| | 134 | | [Newtonsoft.Json.JsonIgnore] |
| 182 | 135 | | public bool IncludeTotalResultCount { get; set; } |
| | 136 | |
|
| | 137 | | /// <summary> |
| | 138 | | /// Gets or sets the list of facet expressions to apply to the search |
| | 139 | | /// query. Each facet expression contains a field name, optionally |
| | 140 | | /// followed by a comma-separated list of name:value pairs. |
| | 141 | | /// </summary> |
| | 142 | | [Newtonsoft.Json.JsonIgnore] |
| 186 | 143 | | public IList<string> Facets { get; set; } |
| | 144 | |
|
| | 145 | | /// <summary> |
| | 146 | | /// Gets or sets the OData $filter expression to apply to the search |
| | 147 | | /// query. |
| | 148 | | /// </summary> |
| | 149 | | [Newtonsoft.Json.JsonIgnore] |
| 202 | 150 | | public string Filter { get; set; } |
| | 151 | |
|
| | 152 | | /// <summary> |
| | 153 | | /// Gets or sets the list of field names to use for hit highlights. |
| | 154 | | /// Only searchable fields can be used for hit highlighting. |
| | 155 | | /// </summary> |
| | 156 | | [Newtonsoft.Json.JsonIgnore] |
| 182 | 157 | | public IList<string> HighlightFields { get; set; } |
| | 158 | |
|
| | 159 | | /// <summary> |
| | 160 | | /// Gets or sets a string tag that is appended to hit highlights. Must |
| | 161 | | /// be set with highlightPreTag. Default is |
| | 162 | | /// &amp;lt;/em&amp;gt;. |
| | 163 | | /// </summary> |
| | 164 | | [Newtonsoft.Json.JsonIgnore] |
| 182 | 165 | | public string HighlightPostTag { get; set; } |
| | 166 | |
|
| | 167 | | /// <summary> |
| | 168 | | /// Gets or sets a string tag that is prepended to hit highlights. Must |
| | 169 | | /// be set with highlightPostTag. Default is |
| | 170 | | /// &amp;lt;em&amp;gt;. |
| | 171 | | /// </summary> |
| | 172 | | [Newtonsoft.Json.JsonIgnore] |
| 182 | 173 | | public string HighlightPreTag { get; set; } |
| | 174 | |
|
| | 175 | | /// <summary> |
| | 176 | | /// Gets or sets a number between 0 and 100 indicating the percentage |
| | 177 | | /// of the index that must be covered by a search query in order for |
| | 178 | | /// the query to be reported as a success. This parameter can be useful |
| | 179 | | /// for ensuring search availability even for services with only one |
| | 180 | | /// replica. The default is 100. |
| | 181 | | /// </summary> |
| | 182 | | [Newtonsoft.Json.JsonIgnore] |
| 182 | 183 | | public double? MinimumCoverage { get; set; } |
| | 184 | |
|
| | 185 | | /// <summary> |
| | 186 | | /// Gets or sets the list of OData $orderby expressions by which to |
| | 187 | | /// sort the results. Each expression can be either a field name or a |
| | 188 | | /// call to either the geo.distance() or the search.score() functions. |
| | 189 | | /// Each expression can be followed by asc to indicate ascending, and |
| | 190 | | /// desc to indicate descending. The default is ascending order. Ties |
| | 191 | | /// will be broken by the match scores of documents. If no OrderBy is |
| | 192 | | /// specified, the default sort order is descending by document match |
| | 193 | | /// score. There can be at most 32 $orderby clauses. |
| | 194 | | /// </summary> |
| | 195 | | [Newtonsoft.Json.JsonIgnore] |
| 198 | 196 | | public IList<string> OrderBy { get; set; } |
| | 197 | |
|
| | 198 | | /// <summary> |
| | 199 | | /// Gets or sets a value that specifies the syntax of the search query. |
| | 200 | | /// The default is 'simple'. Use 'full' if your query uses the Lucene |
| | 201 | | /// query syntax. Possible values include: 'simple', 'full' |
| | 202 | | /// </summary> |
| | 203 | | [Newtonsoft.Json.JsonIgnore] |
| 202 | 204 | | public QueryType QueryType { get; set; } |
| | 205 | |
|
| | 206 | | /// <summary> |
| | 207 | | /// Gets or sets the list of parameter values to be used in scoring |
| | 208 | | /// functions (for example, referencePointParameter) using the format |
| | 209 | | /// name-values. For example, if the scoring profile defines a function |
| | 210 | | /// with a parameter called 'mylocation' the parameter string would be |
| | 211 | | /// "mylocation--122.2,44.8" (without the quotes). |
| | 212 | | /// </summary> |
| | 213 | | [Newtonsoft.Json.JsonIgnore] |
| 182 | 214 | | public IList<ScoringParameter> ScoringParameters { get; set; } |
| | 215 | |
|
| | 216 | | /// <summary> |
| | 217 | | /// Gets or sets the name of a scoring profile to evaluate match scores |
| | 218 | | /// for matching documents in order to sort the results. |
| | 219 | | /// </summary> |
| | 220 | | [Newtonsoft.Json.JsonIgnore] |
| 182 | 221 | | public string ScoringProfile { get; set; } |
| | 222 | |
|
| | 223 | | /// <summary> |
| | 224 | | /// Gets or sets the list of field names to which to scope the |
| | 225 | | /// full-text search. When using fielded search |
| | 226 | | /// (fieldName:searchExpression) in a full Lucene query, the field |
| | 227 | | /// names of each fielded search expression take precedence over any |
| | 228 | | /// field names listed in this parameter. |
| | 229 | | /// </summary> |
| | 230 | | [Newtonsoft.Json.JsonIgnore] |
| 186 | 231 | | public IList<string> SearchFields { get; set; } |
| | 232 | |
|
| | 233 | | /// <summary> |
| | 234 | | /// Gets or sets a value that specifies whether any or all of the |
| | 235 | | /// search terms must be matched in order to count the document as a |
| | 236 | | /// match. Possible values include: 'any', 'all' |
| | 237 | | /// </summary> |
| | 238 | | [Newtonsoft.Json.JsonIgnore] |
| 182 | 239 | | public SearchMode SearchMode { get; set; } |
| | 240 | |
|
| | 241 | | /// <summary> |
| | 242 | | /// Gets or sets the list of fields to retrieve. If unspecified, all |
| | 243 | | /// fields marked as retrievable in the schema are included. |
| | 244 | | /// </summary> |
| | 245 | | [Newtonsoft.Json.JsonIgnore] |
| 206 | 246 | | public IList<string> Select { get; set; } |
| | 247 | |
|
| | 248 | | /// <summary> |
| | 249 | | /// Gets or sets the number of search results to skip. This value |
| | 250 | | /// cannot be greater than 100,000. If you need to scan documents in |
| | 251 | | /// sequence, but cannot use $skip due to this limitation, consider |
| | 252 | | /// using $orderby on a totally-ordered key and $filter with a range |
| | 253 | | /// query instead. |
| | 254 | | /// </summary> |
| | 255 | | [Newtonsoft.Json.JsonIgnore] |
| 186 | 256 | | public int? Skip { get; set; } |
| | 257 | |
|
| | 258 | | /// <summary> |
| | 259 | | /// Gets or sets the number of search results to retrieve. This can be |
| | 260 | | /// used in conjunction with $skip to implement client-side paging of |
| | 261 | | /// search results. If results are truncated due to server-side paging, |
| | 262 | | /// the response will include a continuation token that can be used to |
| | 263 | | /// issue another Search request for the next page of results. |
| | 264 | | /// </summary> |
| | 265 | | [Newtonsoft.Json.JsonIgnore] |
| 194 | 266 | | public int? Top { get; set; } |
| | 267 | |
|
| | 268 | | } |
| | 269 | | } |