Skip to content

Commit fb35317

Browse files
committed
merge main
2 parents 9d2b059 + ef603fb commit fb35317

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1344
-1601
lines changed
Lines changed: 1 addition & 260 deletions
Original file line numberDiff line numberDiff line change
@@ -1,263 +1,4 @@
11
import { BaseIndexSettings } from './baseIndexSettings';
22
import { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams';
33

4-
export type IndexSettings = {
5-
/**
6-
* Creates replicas, exact copies of an index.
7-
*/
8-
replicas?: Array<string>;
9-
/**
10-
* Set the maximum number of hits accessible via pagination.
11-
*/
12-
paginationLimitedTo?: number;
13-
/**
14-
* A list of words for which you want to turn off typo tolerance.
15-
*/
16-
disableTypoToleranceOnWords?: Array<string>;
17-
/**
18-
* Specify on which attributes to apply transliteration.
19-
*/
20-
attributesToTransliterate?: Array<string>;
21-
/**
22-
* List of attributes on which to do a decomposition of camel case words.
23-
*/
24-
camelCaseAttributes?: Array<string>;
25-
/**
26-
* Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding.
27-
*/
28-
decompoundedAttributes?: { [key: string]: object };
29-
/**
30-
* Sets the languages at the index level for language-specific processing such as tokenization and normalization.
31-
*/
32-
indexLanguages?: Array<string>;
33-
/**
34-
* Whether promoted results should match the filters of the current search, except for geographic filters.
35-
*/
36-
filterPromotes?: boolean;
37-
/**
38-
* List of attributes on which you want to disable prefix matching.
39-
*/
40-
disablePrefixOnAttributes?: Array<string>;
41-
/**
42-
* Enables compression of large integer arrays.
43-
*/
44-
allowCompressionOfIntegerArray?: boolean;
45-
/**
46-
* List of numeric attributes that can be used as numerical filters.
47-
*/
48-
numericAttributesForFiltering?: Array<string>;
49-
/**
50-
* Lets you store custom data in your indices.
51-
*/
52-
userData?: { [key: string]: object };
53-
/**
54-
* The complete list of attributes used for searching.
55-
*/
56-
searchableAttributes?: Array<string>;
57-
/**
58-
* The complete list of attributes that will be used for faceting.
59-
*/
60-
attributesForFaceting?: Array<string>;
61-
/**
62-
* List of attributes that can’t be retrieved at query time.
63-
*/
64-
unretrievableAttributes?: Array<string>;
65-
/**
66-
* This parameter controls which attributes to retrieve and which not to retrieve.
67-
*/
68-
attributesToRetrieve?: Array<string>;
69-
/**
70-
* Restricts a given query to look in only a subset of your searchable attributes.
71-
*/
72-
restrictSearchableAttributes?: Array<string>;
73-
/**
74-
* Controls how Algolia should sort your results.
75-
*/
76-
ranking?: Array<string>;
77-
/**
78-
* Specifies the custom ranking criterion.
79-
*/
80-
customRanking?: Array<string>;
81-
/**
82-
* Controls the relevancy threshold below which less relevant results aren’t included in the results.
83-
*/
84-
relevancyStrictness?: number;
85-
/**
86-
* List of attributes to highlight.
87-
*/
88-
attributesToHighlight?: Array<string>;
89-
/**
90-
* List of attributes to snippet, with an optional maximum number of words to snippet.
91-
*/
92-
attributesToSnippet?: Array<string>;
93-
/**
94-
* The HTML string to insert before the highlighted parts in all highlight and snippet results.
95-
*/
96-
highlightPreTag?: string;
97-
/**
98-
* The HTML string to insert after the highlighted parts in all highlight and snippet results.
99-
*/
100-
highlightPostTag?: string;
101-
/**
102-
* String used as an ellipsis indicator when a snippet is truncated.
103-
*/
104-
snippetEllipsisText?: string;
105-
/**
106-
* Restrict highlighting and snippeting to items that matched the query.
107-
*/
108-
restrictHighlightAndSnippetArrays?: boolean;
109-
/**
110-
* Set the number of hits per page.
111-
*/
112-
hitsPerPage?: number;
113-
/**
114-
* Minimum number of characters a word in the query string must contain to accept matches with 1 typo.
115-
*/
116-
minWordSizefor1Typo?: number;
117-
/**
118-
* Minimum number of characters a word in the query string must contain to accept matches with 2 typos.
119-
*/
120-
minWordSizefor2Typos?: number;
121-
/**
122-
* Controls whether typo tolerance is enabled and how it is applied.
123-
*/
124-
typoTolerance?: IndexSettings.TypoToleranceEnum;
125-
/**
126-
* Whether to allow typos on numbers (“numeric tokens”) in the query string.
127-
*/
128-
allowTyposOnNumericTokens?: boolean;
129-
/**
130-
* List of attributes on which you want to disable typo tolerance.
131-
*/
132-
disableTypoToleranceOnAttributes?: Array<string>;
133-
/**
134-
* Control which separators are indexed.
135-
*/
136-
separatorsToIndex?: string;
137-
/**
138-
* Treats singular, plurals, and other forms of declensions as matching terms.
139-
*/
140-
ignorePlurals?: string;
141-
/**
142-
* Removes stop (common) words from the query before executing it.
143-
*/
144-
removeStopWords?: string;
145-
/**
146-
* List of characters that the engine shouldn’t automatically normalize.
147-
*/
148-
keepDiacriticsOnCharacters?: string;
149-
/**
150-
* Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection.
151-
*/
152-
queryLanguages?: Array<string>;
153-
/**
154-
* Splits compound words into their composing atoms in the query.
155-
*/
156-
decompoundQuery?: boolean;
157-
/**
158-
* Whether Rules should be globally enabled.
159-
*/
160-
enableRules?: boolean;
161-
/**
162-
* Enable the Personalization feature.
163-
*/
164-
enablePersonalization?: boolean;
165-
/**
166-
* Controls if and how query words are interpreted as prefixes.
167-
*/
168-
queryType?: IndexSettings.QueryTypeEnum;
169-
/**
170-
* Selects a strategy to remove words from the query when it doesn’t match any hits.
171-
*/
172-
removeWordsIfNoResults?: IndexSettings.RemoveWordsIfNoResultsEnum;
173-
/**
174-
* Enables the advanced query syntax.
175-
*/
176-
advancedSyntax?: boolean;
177-
/**
178-
* A list of words that should be considered as optional when found in the query.
179-
*/
180-
optionalWords?: Array<string>;
181-
/**
182-
* List of attributes on which you want to disable the exact ranking criterion.
183-
*/
184-
disableExactOnAttributes?: Array<string>;
185-
/**
186-
* Controls how the exact ranking criterion is computed when the query contains only one word.
187-
*/
188-
exactOnSingleWordQuery?: IndexSettings.ExactOnSingleWordQueryEnum;
189-
/**
190-
* List of alternatives that should be considered an exact match by the exact ranking criterion.
191-
*/
192-
alternativesAsExact?: Array<IndexSettings.AlternativesAsExactEnum>;
193-
/**
194-
* Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is enabled.
195-
*/
196-
advancedSyntaxFeatures?: Array<IndexSettings.AdvancedSyntaxFeaturesEnum>;
197-
/**
198-
* Enables de-duplication or grouping of results.
199-
*/
200-
distinct?: number;
201-
/**
202-
* Whether to take into account an index’s synonyms for a particular search.
203-
*/
204-
synonyms?: boolean;
205-
/**
206-
* Whether to highlight and snippet the original word that matches the synonym or the synonym itself.
207-
*/
208-
replaceSynonymsInHighlight?: boolean;
209-
/**
210-
* Precision of the proximity ranking criterion.
211-
*/
212-
minProximity?: number;
213-
/**
214-
* Choose which fields to return in the API response. This parameters applies to search and browse queries.
215-
*/
216-
responseFields?: Array<string>;
217-
/**
218-
* Maximum number of facet hits to return during a search for facet values.
219-
*/
220-
maxFacetHits?: number;
221-
/**
222-
* When attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage.
223-
*/
224-
attributeCriteriaComputedByMinProximity?: boolean;
225-
/**
226-
* Content defining how the search interface should be rendered. Can be set via the settings for a default value and can be overridden via rules.
227-
*/
228-
renderingContent?: object;
229-
};
230-
231-
export namespace IndexSettings {
232-
export enum TypoToleranceEnum {
233-
True = 'true',
234-
False = 'false',
235-
Min = 'min',
236-
Strict = 'strict',
237-
}
238-
export enum QueryTypeEnum {
239-
PrefixLast = 'prefixLast',
240-
PrefixAll = 'prefixAll',
241-
PrefixNone = 'prefixNone',
242-
}
243-
export enum RemoveWordsIfNoResultsEnum {
244-
None = 'none',
245-
LastWords = 'lastWords',
246-
FirstWords = 'firstWords',
247-
AllOptional = 'allOptional',
248-
}
249-
export enum ExactOnSingleWordQueryEnum {
250-
Attribute = 'attribute',
251-
None = 'none',
252-
Word = 'word',
253-
}
254-
export enum AlternativesAsExactEnum {
255-
IgnorePlurals = 'ignorePlurals',
256-
SingleWordSynonym = 'singleWordSynonym',
257-
MultiWordsSynonym = 'multiWordsSynonym',
258-
}
259-
export enum AdvancedSyntaxFeaturesEnum {
260-
ExactPhrase = 'exactPhrase',
261-
ExcludeWords = 'excludeWords',
262-
}
263-
}
4+
export type IndexSettings = BaseIndexSettings & IndexSettingsAsSearchParams;

clients/algoliasearch-client-javascript/client-search/model/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export * from './rankingInfo';
1818
export * from './rankingInfoMatchedGeoLocation';
1919
export * from './record';
2020
export * from './saveObjectResponse';
21+
export * from './searchHits';
2122
export * from './searchParams';
2223
export * from './searchParamsAsString';
2324
export * from './searchResponse';
24-
export * from './searchResponseAllOf';
2525
export * from './setSettingsResponse';
2626
export * from './snippetResult';
2727

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { Record } from './record';
2+
3+
export type SearchHits = {
4+
hits?: Array<Record>;
5+
};

0 commit comments

Comments
 (0)