algolia / algoliasearch-client-javascript

⚡️ A fully-featured and blazing-fast JavaScript API client to interact with Algolia.

Home Page:https://www.algolia.com/doc/api-client/javascript/getting-started/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

queryLanguages not listed in SearchOptions

gbillig opened this issue · comments

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?

I've opened #1406 to solve this, in the mean time you can use ts-expect-error :)