| | 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 | | /// Additional parameters for AutocompleteGet operation. |
| | 20 | | /// </summary> |
| | 21 | | public partial class AutocompleteParameters |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the AutocompleteParameters class. |
| | 25 | | /// </summary> |
| 70 | 26 | | public AutocompleteParameters() |
| | 27 | | { |
| | 28 | | CustomInit(); |
| 70 | 29 | | } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Initializes a new instance of the AutocompleteParameters class. |
| | 33 | | /// </summary> |
| | 34 | | /// <param name="autocompleteMode">Specifies the mode for Autocomplete. |
| | 35 | | /// The default is 'oneTerm'. Use 'twoTerms' to get shingles and |
| | 36 | | /// 'oneTermWithContext' to use the current context while producing |
| | 37 | | /// auto-completed terms. Possible values include: 'oneTerm', |
| | 38 | | /// 'twoTerms', 'oneTermWithContext'</param> |
| | 39 | | /// <param name="filter">An OData expression that filters the documents |
| | 40 | | /// used to produce completed terms for the Autocomplete |
| | 41 | | /// result.</param> |
| | 42 | | /// <param name="useFuzzyMatching">A value indicating whether to use |
| | 43 | | /// fuzzy matching for the autocomplete query. Default is false. When |
| | 44 | | /// set to true, the query will find terms even if there's a |
| | 45 | | /// substituted or missing character in the search text. While this |
| | 46 | | /// provides a better experience in some scenarios, it comes at a |
| | 47 | | /// performance cost as fuzzy autocomplete queries are slower and |
| | 48 | | /// consume more resources.</param> |
| | 49 | | /// <param name="highlightPostTag">A string tag that is appended to hit |
| | 50 | | /// highlights. Must be set with highlightPreTag. If omitted, hit |
| | 51 | | /// highlighting is disabled.</param> |
| | 52 | | /// <param name="highlightPreTag">A string tag that is prepended to hit |
| | 53 | | /// highlights. Must be set with highlightPostTag. If omitted, hit |
| | 54 | | /// highlighting is disabled.</param> |
| | 55 | | /// <param name="minimumCoverage">A number between 0 and 100 indicating |
| | 56 | | /// the percentage of the index that must be covered by an autocomplete |
| | 57 | | /// query in order for the query to be reported as a success. This |
| | 58 | | /// parameter can be useful for ensuring search availability even for |
| | 59 | | /// services with only one replica. The default is 80.</param> |
| | 60 | | /// <param name="searchFields">The list of field names to consider when |
| | 61 | | /// querying for auto-completed terms. Target fields must be included |
| | 62 | | /// in the specified suggester.</param> |
| | 63 | | /// <param name="top">The number of auto-completed terms to retrieve. |
| | 64 | | /// This must be a value between 1 and 100. The default is 5.</param> |
| 0 | 65 | | public AutocompleteParameters(AutocompleteMode autocompleteMode = default(AutocompleteMode), string filter = def |
| | 66 | | { |
| 0 | 67 | | AutocompleteMode = autocompleteMode; |
| 0 | 68 | | Filter = filter; |
| 0 | 69 | | UseFuzzyMatching = useFuzzyMatching; |
| 0 | 70 | | HighlightPostTag = highlightPostTag; |
| 0 | 71 | | HighlightPreTag = highlightPreTag; |
| 0 | 72 | | MinimumCoverage = minimumCoverage; |
| 0 | 73 | | SearchFields = searchFields; |
| 0 | 74 | | Top = top; |
| | 75 | | CustomInit(); |
| 0 | 76 | | } |
| | 77 | |
|
| | 78 | | /// <summary> |
| | 79 | | /// An initialization method that performs custom operations like setting defaults |
| | 80 | | /// </summary> |
| | 81 | | partial void CustomInit(); |
| | 82 | |
|
| | 83 | | /// <summary> |
| | 84 | | /// Gets or sets specifies the mode for Autocomplete. The default is |
| | 85 | | /// 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' |
| | 86 | | /// to use the current context while producing auto-completed terms. |
| | 87 | | /// Possible values include: 'oneTerm', 'twoTerms', |
| | 88 | | /// 'oneTermWithContext' |
| | 89 | | /// </summary> |
| | 90 | | [Newtonsoft.Json.JsonIgnore] |
| 134 | 91 | | public AutocompleteMode AutocompleteMode { get; set; } |
| | 92 | |
|
| | 93 | | /// <summary> |
| | 94 | | /// Gets or sets an OData expression that filters the documents used to |
| | 95 | | /// produce completed terms for the Autocomplete result. |
| | 96 | | /// </summary> |
| | 97 | | [Newtonsoft.Json.JsonIgnore] |
| 86 | 98 | | public string Filter { get; set; } |
| | 99 | |
|
| | 100 | | /// <summary> |
| | 101 | | /// Gets or sets a value indicating whether to use fuzzy matching for |
| | 102 | | /// the autocomplete query. Default is false. When set to true, the |
| | 103 | | /// query will find terms even if there's a substituted or missing |
| | 104 | | /// character in the search text. While this provides a better |
| | 105 | | /// experience in some scenarios, it comes at a performance cost as |
| | 106 | | /// fuzzy autocomplete queries are slower and consume more resources. |
| | 107 | | /// </summary> |
| | 108 | | [Newtonsoft.Json.JsonIgnore] |
| 90 | 109 | | public bool? UseFuzzyMatching { get; set; } |
| | 110 | |
|
| | 111 | | /// <summary> |
| | 112 | | /// Gets or sets a string tag that is appended to hit highlights. Must |
| | 113 | | /// be set with highlightPreTag. If omitted, hit highlighting is |
| | 114 | | /// disabled. |
| | 115 | | /// </summary> |
| | 116 | | [Newtonsoft.Json.JsonIgnore] |
| 74 | 117 | | public string HighlightPostTag { get; set; } |
| | 118 | |
|
| | 119 | | /// <summary> |
| | 120 | | /// Gets or sets a string tag that is prepended to hit highlights. Must |
| | 121 | | /// be set with highlightPostTag. If omitted, hit highlighting is |
| | 122 | | /// disabled. |
| | 123 | | /// </summary> |
| | 124 | | [Newtonsoft.Json.JsonIgnore] |
| 74 | 125 | | public string HighlightPreTag { get; set; } |
| | 126 | |
|
| | 127 | | /// <summary> |
| | 128 | | /// Gets or sets a number between 0 and 100 indicating the percentage |
| | 129 | | /// of the index that must be covered by an autocomplete query in order |
| | 130 | | /// for the query to be reported as a success. This parameter can be |
| | 131 | | /// useful for ensuring search availability even for services with only |
| | 132 | | /// one replica. The default is 80. |
| | 133 | | /// </summary> |
| | 134 | | [Newtonsoft.Json.JsonIgnore] |
| 0 | 135 | | public double? MinimumCoverage { get; set; } |
| | 136 | |
|
| | 137 | | /// <summary> |
| | 138 | | /// Gets or sets the list of field names to consider when querying for |
| | 139 | | /// auto-completed terms. Target fields must be included in the |
| | 140 | | /// specified suggester. |
| | 141 | | /// </summary> |
| | 142 | | [Newtonsoft.Json.JsonIgnore] |
| 82 | 143 | | public IList<string> SearchFields { get; set; } |
| | 144 | |
|
| | 145 | | /// <summary> |
| | 146 | | /// Gets or sets the number of auto-completed terms to retrieve. This |
| | 147 | | /// must be a value between 1 and 100. The default is 5. |
| | 148 | | /// </summary> |
| | 149 | | [Newtonsoft.Json.JsonIgnore] |
| 74 | 150 | | public int? Top { get; set; } |
| | 151 | |
|
| | 152 | | } |
| | 153 | | } |