Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queryLanguages not listed in SearchOptions #1405

Closed
gbillig opened this issue May 16, 2022 · 1 comment · Fixed by #1406
Closed

queryLanguages not listed in SearchOptions #1405

gbillig opened this issue May 16, 2022 · 1 comment · Fixed by #1406

Comments

@gbillig
Copy link

gbillig commented May 16, 2022

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?

@Haroenv
Copy link
Contributor

Haroenv commented May 17, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants