According to the documentation of the queryLanguages parameter, it can be passed to the search function as so:
index.search('query string', { queryLanguages: ['en'] })
.then(({ hits }) => {
console.log(hits);
});
The second parameter of search is requestOptions and is typed as RequestOptions & SearchOptions. However I don't see the queryLanguages listed in the SearchOptions type (I don't expect it to be in RequestOptions since that type is purely for configuring the request itself). Right now queryLanguages is listed in the in Settings type but I believe it could also be added to SearchOptions.
What do you guys think about adding queryLanguages to SeachOptions?
According to the documentation of the
queryLanguagesparameter, it can be passed to the search function as so:The second parameter of
searchisrequestOptionsand is typed asRequestOptions & SearchOptions. However I don't see thequeryLanguageslisted in theSearchOptionstype (I don't expect it to be inRequestOptionssince that type is purely for configuring the request itself). Right nowqueryLanguagesis listed in the inSettingstype but I believe it could also be added toSearchOptions.What do you guys think about adding
queryLanguagestoSeachOptions?