|
| 1 | +package com.algolia.search.model.params |
| 2 | + |
| 3 | +import com.algolia.search.model.Attribute |
| 4 | +import com.algolia.search.model.search.AlternativesAsExact |
| 5 | +import com.algolia.search.model.search.ExactOnSingleWordQuery |
| 6 | +import com.algolia.search.model.search.IgnorePlurals |
| 7 | +import com.algolia.search.model.search.Language |
| 8 | +import com.algolia.search.model.search.QueryType |
| 9 | +import com.algolia.search.model.search.RemoveStopWords |
| 10 | +import com.algolia.search.model.search.RemoveWordIfNoResults |
| 11 | +import com.algolia.search.model.search.ResponseFields |
| 12 | +import com.algolia.search.model.search.SortFacetsBy |
| 13 | +import com.algolia.search.model.search.TypoTolerance |
| 14 | +import com.algolia.search.model.settings.AdvancedSyntaxFeatures |
| 15 | +import com.algolia.search.model.settings.Distinct |
| 16 | + |
| 17 | +public interface BaseParameters { |
| 18 | + |
| 19 | + /** |
| 20 | + * Gives control over which attributes to retrieve and which not to retrieve. |
| 21 | + * Engine default: [*] |
| 22 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/attributesToRetrieve/?language=kotlin] |
| 23 | + */ |
| 24 | + public var attributesToRetrieve: List<Attribute>? |
| 25 | + |
| 26 | + /** |
| 27 | + * Maximum number of facet values to return for each facet during a regular search. |
| 28 | + * Engine default: 100 |
| 29 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/maxValuesPerFacet/?language=kotlin] |
| 30 | + */ |
| 31 | + public var maxValuesPerFacet: Int? |
| 32 | + |
| 33 | + /** |
| 34 | + * Engine default: [SortFacetsBy.Count] |
| 35 | + * Controls how facet values are sorted. |
| 36 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/sortFacetValuesBy/?language=kotlin] |
| 37 | + */ |
| 38 | + public var sortFacetsBy: SortFacetsBy? |
| 39 | + |
| 40 | + /** |
| 41 | + * List of attributes to highlight. |
| 42 | + * Engine default: [*] |
| 43 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/?language=kotlin] |
| 44 | + */ |
| 45 | + public var attributesToHighlight: List<Attribute>? |
| 46 | + |
| 47 | + /** |
| 48 | + * The HTML string to insert before the highlighted parts in all highlight and snippet results. |
| 49 | + * Needs to be used along [highlightPostTag]. |
| 50 | + * Engine default: "<em>" |
| 51 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/highlightPreTag/?language=kotlin] |
| 52 | + */ |
| 53 | + public var highlightPreTag: String? |
| 54 | + |
| 55 | + /** |
| 56 | + * The HTML string to insert after the highlighted parts in all highlight and snippet results. |
| 57 | + * Needs to be used along [highlightPreTag]. |
| 58 | + * Engine default: "</em>" |
| 59 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/highlightPostTag/?language=kotlin] |
| 60 | + */ |
| 61 | + public var highlightPostTag: String? |
| 62 | + |
| 63 | + /** |
| 64 | + * String used as an ellipsis indicator when a snippet is truncated. |
| 65 | + * Engine default: "…" (U+2026, HORIZONTAL ELLIPSIS) |
| 66 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/snippetEllipsisText/?language=kotlin] |
| 67 | + */ |
| 68 | + public var snippetEllipsisText: String? |
| 69 | + |
| 70 | + /** |
| 71 | + * Restrict highlighting and snippeting to items that matched the query. |
| 72 | + * Engine default: false |
| 73 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/restrictHighlightAndSnippetArrays/?language=kotlin] |
| 74 | + */ |
| 75 | + public var restrictHighlightAndSnippetArrays: Boolean? |
| 76 | + |
| 77 | + /** |
| 78 | + * Minimum number of characters a word in the query name must contain to accept matches with 1 typo. |
| 79 | + * Engine default: 4 |
| 80 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/minWordSizefor1Typo/?language=kotlin] |
| 81 | + */ |
| 82 | + public var minWordSizeFor1Typo: Int? |
| 83 | + |
| 84 | + /** |
| 85 | + * Minimum number of characters a word in the query name must contain to accept matches with 2 typos. |
| 86 | + * Engine default: 8 |
| 87 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/minWordSizefor2Typos/?language=kotlin] |
| 88 | + */ |
| 89 | + public var minWordSizeFor2Typos: Int? |
| 90 | + |
| 91 | + /** |
| 92 | + * Controls whether typo tolerance is enabled and how it is applied. |
| 93 | + * Engine defaults: true |
| 94 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/typoTolerance/?language=kotlin] |
| 95 | + */ |
| 96 | + public var typoTolerance: TypoTolerance? |
| 97 | + |
| 98 | + /** |
| 99 | + * Whether to allow typos on numbers (“numeric tokens”) in the query name. |
| 100 | + * Engine default: true |
| 101 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/allowTyposOnNumericTokens/?language=kotlin] |
| 102 | + */ |
| 103 | + public var allowTyposOnNumericTokens: Boolean? |
| 104 | + |
| 105 | + /** |
| 106 | + * List of attributes on which you want to disable typo tolerance. |
| 107 | + * Engine default: [] |
| 108 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/disabletypotoleranceonattributes/?language=kotlin] |
| 109 | + */ |
| 110 | + public var disableTypoToleranceOnAttributes: List<Attribute>? |
| 111 | + |
| 112 | + /** |
| 113 | + * Treats singular, plurals, and other forms of declensions as matching terms. |
| 114 | + * Engine default: false |
| 115 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/ignorePlurals/?language=kotlin] |
| 116 | + */ |
| 117 | + public var ignorePlurals: IgnorePlurals? |
| 118 | + |
| 119 | + /** |
| 120 | + * Removes stop (task) words from the query before executing it. |
| 121 | + * Engine default: false |
| 122 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/removeStopWords/?language=kotlin] |
| 123 | + */ |
| 124 | + public var removeStopWords: RemoveStopWords? |
| 125 | + |
| 126 | + /** |
| 127 | + * Whether rules should be globally enabled. |
| 128 | + * Engine default: true |
| 129 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/enableRules/?language=kotlin] |
| 130 | + */ |
| 131 | + public var enableRules: Boolean? |
| 132 | + |
| 133 | + /** |
| 134 | + * Controls if and how query words are interpreted as [prefixes][https://www.algolia.com/doc/guides/textual-relevance/prefix-search/?language=kotlin]. |
| 135 | + * Engine default: [QueryType.PrefixLast] |
| 136 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/queryType/?language=kotlin] |
| 137 | + */ |
| 138 | + public var queryType: QueryType? |
| 139 | + |
| 140 | + /** |
| 141 | + * Selects a strategy to remove words from the query when it doesn’t match any hits. |
| 142 | + * Engine default: [RemoveWordIfNoResults.None] |
| 143 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/removeWordsIfNoResults/?language=kotlin] |
| 144 | + */ |
| 145 | + public var removeWordsIfNoResults: RemoveWordIfNoResults? |
| 146 | + |
| 147 | + /** |
| 148 | + * Enables the advanced query syntax. |
| 149 | + * Engine default: false |
| 150 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/advancedSyntax/?language=kotlin] |
| 151 | + */ |
| 152 | + public var advancedSyntax: Boolean? |
| 153 | + |
| 154 | + /** |
| 155 | + * A list of words that should be considered as optional when found in the query. |
| 156 | + * Engine default: [] |
| 157 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/optionalWords/?language=kotlin] |
| 158 | + */ |
| 159 | + public var optionalWords: List<String>? |
| 160 | + |
| 161 | + /** |
| 162 | + * List of [Attribute] on which you want to disable the exact ranking criterion. |
| 163 | + * Engine default: [] |
| 164 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/disableExactOnAttributes/?language=kotlin] |
| 165 | + */ |
| 166 | + public var disableExactOnAttributes: List<Attribute>? |
| 167 | + |
| 168 | + /** |
| 169 | + * Controls how the exact ranking criterion is computed when the query contains only one word. |
| 170 | + * Engine default: [ExactOnSingleWordQuery.Attribute] |
| 171 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/exactOnSingleWordQuery/?language=kotlin] |
| 172 | + */ |
| 173 | + public var exactOnSingleWordQuery: ExactOnSingleWordQuery? |
| 174 | + |
| 175 | + /** |
| 176 | + * List of alternatives that should be considered an exact match by the exact ranking criterion. |
| 177 | + * Engine default: [[AlternativesAsExact.IgnorePlurals], [AlternativesAsExact.SingleWordSynonym]] |
| 178 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/alternativesAsExact/?language=kotlin] |
| 179 | + */ |
| 180 | + public var alternativesAsExact: List<AlternativesAsExact>? |
| 181 | + |
| 182 | + /** |
| 183 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters//?language=kotlin] |
| 184 | + */ |
| 185 | + public var advancedSyntaxFeatures: List<AdvancedSyntaxFeatures>? |
| 186 | + |
| 187 | + /** |
| 188 | + * Enables de-duplication or grouping of results. |
| 189 | + * Engine default: 0 |
| 190 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/distinct/?language=kotlin] |
| 191 | + */ |
| 192 | + public var distinct: Distinct? |
| 193 | + |
| 194 | + /** |
| 195 | + * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. |
| 196 | + * Engine default: true |
| 197 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters//?language=kotlin] |
| 198 | + */ |
| 199 | + public var replaceSynonymsInHighlight: Boolean? |
| 200 | + |
| 201 | + /** |
| 202 | + * Precision of the proximity ranking criterion. |
| 203 | + * Engine default: 1 |
| 204 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/minProximity/?language=kotlin] |
| 205 | + */ |
| 206 | + public var minProximity: Int? |
| 207 | + |
| 208 | + /** |
| 209 | + * Choose which fields the response will contain. Applies to search and browse queries. |
| 210 | + * Engine default: [ResponseFields.All] |
| 211 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/responseFields/?language=kotlin] |
| 212 | + */ |
| 213 | + public var responseFields: List<ResponseFields>? |
| 214 | + |
| 215 | + /** |
| 216 | + * Maximum number of facet hits to return during a search for facet values. |
| 217 | + * Engine default: 10 |
| 218 | + * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/maxFacetHits/?language=kotlin] |
| 219 | + */ |
| 220 | + public var maxFacetHits: Int? |
| 221 | +} |
0 commit comments