Skip to content

Commit bdf67a5

Browse files
author
Eunjae Lee
authored
fix(types): update FindAnswersOptions (#1258)
1 parent b5b84c1 commit bdf67a5

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed
Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,47 @@
11
import { SearchOptions } from './SearchOptions';
22

33
export type FindAnswersOptions = {
4+
/**
5+
* Attributes to use for predictions.
6+
* If using the default (["*"]), all attributes are used to find answers.
7+
*/
48
readonly attributesForPrediction?: readonly string[];
9+
10+
/**
11+
* Maximum number of answers to retrieve from the Answers Engine.
12+
* Cannot be greater than 1000.
13+
*/
514
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+
*/
620
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+
>;
847
};

0 commit comments

Comments
 (0)