-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(specs): add
settings
spec (#17)
- Loading branch information
Showing
32 changed files
with
971 additions
and
797 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ yarn-error.log | |
**/node_modules | ||
**/dist | ||
**/.openapi-generator-ignore | ||
**/git_push.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
clients/algoliasearch-client-javascript/model/baseIndexSettings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
export type BaseIndexSettings = { | ||
/** | ||
* Creates replicas, exact copies of an index. | ||
*/ | ||
replicas?: Array<string>; | ||
/** | ||
* Set the maximum number of hits accessible via pagination. | ||
*/ | ||
paginationLimitedTo?: number; | ||
/** | ||
* A list of words for which you want to turn off typo tolerance. | ||
*/ | ||
disableTypoToleranceOnWords?: Array<string>; | ||
/** | ||
* Specify on which attributes to apply transliteration. | ||
*/ | ||
attributesToTransliterate?: Array<string>; | ||
/** | ||
* List of attributes on which to do a decomposition of camel case words. | ||
*/ | ||
camelCaseAttributes?: Array<string>; | ||
/** | ||
* Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding. | ||
*/ | ||
decompoundedAttributes?: { [key: string]: object }; | ||
/** | ||
* Sets the languages at the index level for language-specific processing such as tokenization and normalization. | ||
*/ | ||
indexLanguages?: Array<string>; | ||
/** | ||
* Whether promoted results should match the filters of the current search, except for geographic filters. | ||
*/ | ||
filterPromotes?: boolean; | ||
/** | ||
* List of attributes on which you want to disable prefix matching. | ||
*/ | ||
disablePrefixOnAttributes?: Array<string>; | ||
/** | ||
* Enables compression of large integer arrays. | ||
*/ | ||
allowCompressionOfIntegerArray?: boolean; | ||
/** | ||
* List of numeric attributes that can be used as numerical filters. | ||
*/ | ||
numericAttributesForFiltering?: Array<string>; | ||
/** | ||
* Lets you store custom data in your indices. | ||
*/ | ||
userData?: { [key: string]: object }; | ||
}; |
134 changes: 134 additions & 0 deletions
134
clients/algoliasearch-client-javascript/model/baseSearchParams.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
export type BaseSearchParams = { | ||
/** | ||
* The text to search in the index. | ||
*/ | ||
query: string; | ||
/** | ||
* Overrides the query parameter and performs a more generic search that can be used to find \"similar\" results. | ||
*/ | ||
similarQuery?: string; | ||
/** | ||
* Filter the query with numeric, facet and/or tag filters. | ||
*/ | ||
filters?: string; | ||
/** | ||
* Filter hits by facet value. | ||
*/ | ||
facetFilters?: Array<string>; | ||
/** | ||
* Create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter. | ||
*/ | ||
optionalFilters?: Array<string>; | ||
/** | ||
* Filter on numeric attributes. | ||
*/ | ||
numericFilters?: Array<string>; | ||
/** | ||
* Filter hits by tags. | ||
*/ | ||
tagFilters?: Array<string>; | ||
/** | ||
* Determines how to calculate the total score for filtering. | ||
*/ | ||
sumOrFiltersScores?: boolean; | ||
/** | ||
* Retrieve facets and their facet values. | ||
*/ | ||
facets?: Array<string>; | ||
/** | ||
* Maximum number of facet values to return for each facet during a regular search. | ||
*/ | ||
maxValuesPerFacet?: number; | ||
/** | ||
* Force faceting to be applied after de-duplication (via the Distinct setting). | ||
*/ | ||
facetingAfterDistinct?: boolean; | ||
/** | ||
* Controls how facet values are fetched. | ||
*/ | ||
sortFacetValuesBy?: string; | ||
/** | ||
* Specify the page to retrieve. | ||
*/ | ||
page?: number; | ||
/** | ||
* Specify the offset of the first hit to return. | ||
*/ | ||
offset?: number; | ||
/** | ||
* Set the number of hits to retrieve (used only with offset). | ||
*/ | ||
length?: number; | ||
/** | ||
* Search for entries around a central geolocation, enabling a geo search within a circular area. | ||
*/ | ||
aroundLatLng?: string; | ||
/** | ||
* Search for entries around a given location automatically computed from the requester’s IP address. | ||
*/ | ||
aroundLatLngViaIP?: boolean; | ||
/** | ||
* Define the maximum radius for a geo search (in meters). | ||
*/ | ||
aroundRadius?: number | string | null; | ||
/** | ||
* Precision of geo search (in meters), to add grouping by geo location to the ranking formula. | ||
*/ | ||
aroundPrecision?: number; | ||
/** | ||
* Minimum radius (in meters) used for a geo search when aroundRadius is not set. | ||
*/ | ||
minimumAroundRadius?: number; | ||
/** | ||
* Search inside a rectangular area (in geo coordinates). | ||
*/ | ||
insideBoundingBox?: Array<number>; | ||
/** | ||
* Search inside a polygon (in geo coordinates). | ||
*/ | ||
insidePolygon?: Array<number>; | ||
/** | ||
* This parameter changes the default values of certain parameters and settings that work best for a natural language query, such as ignorePlurals, removeStopWords, removeWordsIfNoResults, analyticsTags and ruleContexts. These parameters and settings work well together when the query is formatted in natural language instead of keywords, for example when your user performs a voice search. | ||
*/ | ||
naturalLanguages?: Array<string>; | ||
/** | ||
* Enables contextual rules. | ||
*/ | ||
ruleContexts?: Array<string>; | ||
/** | ||
* Define the impact of the Personalization feature. | ||
*/ | ||
personalizationImpact?: number; | ||
/** | ||
* Associates a certain user token with the current search. | ||
*/ | ||
userToken?: string; | ||
/** | ||
* Retrieve detailed ranking information. | ||
*/ | ||
getRankingInfo?: boolean; | ||
/** | ||
* Enable the Click Analytics feature. | ||
*/ | ||
clickAnalytics?: boolean; | ||
/** | ||
* Whether the current query will be taken into account in the Analytics. | ||
*/ | ||
analytics?: boolean; | ||
/** | ||
* List of tags to apply to the query for analytics purposes. | ||
*/ | ||
analyticsTags?: Array<string>; | ||
/** | ||
* Whether to include or exclude a query from the processing-time percentile computation. | ||
*/ | ||
percentileComputation?: boolean; | ||
/** | ||
* Whether this search should participate in running AB tests. | ||
*/ | ||
enableABTest?: boolean; | ||
/** | ||
* Whether this search should use AI Re-Ranking. | ||
*/ | ||
enableReRanking?: boolean; | ||
}; |
4 changes: 4 additions & 0 deletions
4
clients/algoliasearch-client-javascript/model/indexSettings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { BaseIndexSettings } from './baseIndexSettings'; | ||
import { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams'; | ||
|
||
export type IndexSettings = BaseIndexSettings & IndexSettingsAsSearchParams; |
Oops, something went wrong.