File tree Expand file tree Collapse file tree 1 file changed +40
-1
lines changed
packages/client-search/src/types Expand file tree Collapse file tree 1 file changed +40
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { SearchOptions } from './SearchOptions' ;
2
2
3
3
export type FindAnswersOptions = {
4
+ /**
5
+ * Attributes to use for predictions.
6
+ * If using the default (["*"]), all attributes are used to find answers.
7
+ */
4
8
readonly attributesForPrediction ?: readonly string [ ] ;
9
+
10
+ /**
11
+ * Maximum number of answers to retrieve from the Answers Engine.
12
+ * Cannot be greater than 1000.
13
+ */
5
14
readonly nbHits ?: number ;
15
+
16
+ /**
17
+ * Threshold for the answers’ confidence score:
18
+ * only answers with extracts that score above this threshold are returned.
19
+ */
6
20
readonly threshold ?: number ;
7
- readonly searchParameters ?: SearchOptions ;
21
+
22
+ /**
23
+ * Whether the attribute name in which the answer was found should be returned.
24
+ * This option is expensive in processing time.
25
+ */
26
+ readonly returnExtractAttribute ?: boolean ;
27
+
28
+ /**
29
+ * Algolia search parameters to use to fetch the hits.
30
+ * Can be any search parameter, except:
31
+ * - attributesToSnippet
32
+ * - hitsPerPage
33
+ * - queryType
34
+ * - naturalLanguages and associated parameters
35
+ * (removeStopWords, ignorePlurals, and removeWordsIfNoResults)
36
+ */
37
+ readonly searchParameters ?: Omit <
38
+ SearchOptions ,
39
+ | 'attributesToSnippet'
40
+ | 'hitsPerPage'
41
+ | 'queryType'
42
+ | 'naturalLanguages'
43
+ | 'removeStopWords'
44
+ | 'ignorePlurals'
45
+ | 'andremoveWordsIfNoResults'
46
+ > ;
8
47
} ;
You can’t perform that action at this time.
0 commit comments