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

There is no option of selecting limit_multi_searches in multiSearch using typescript. #162

Open
MarkoRisticSting opened this issue Jun 20, 2023 · 6 comments

Comments

@MarkoRisticSting
Copy link

Description

There is no option of selecting limit_multi_searches in multiSearch using typescript.

Steps to reproduce

typescript complains

Screenshot 2023-06-20 at 20 49 44

Expected Behavior

To already have option for limit_multi_searches in MultiSearchRequestSchema
We can see that it is missing.

Screenshot 2023-06-20 at 20 52 52

Actual Behavior

TS2345: Argument of type { collection: string; limit_multi_searches: number; }' is not assignable to parameter of type 'Partial<MultiSearchRequestSchema>.

Metadata

1.5.4

Mac OS

@jasonbosco
Copy link
Member

Ah, will fix the types for this. On a side note, even though the multi_search endpoint supports limit_multi_searches, I would recommend embedding it in a Scoped Search API key, so it cannot be modified.

@MarkoRisticSting
Copy link
Author

MarkoRisticSting commented Jun 20, 2023

Thanks for quick response. Does it makes sense to add it to GenerateScopedSearchKeyParams also? @jasonbosco

@jasonbosco
Copy link
Member

Yeah, I'll probably just add limit_multi_searches only to GenerateScopedSearchKeyParams to encourage recommended usage of this param.

@jasonbosco
Copy link
Member

Could you try this with v1.6.0-1?

@MarkoRisticSting
Copy link
Author

Typescript doesn't complain anymore, let me figure out how Scoped Search API key works now 😂 thanks again.
Screenshot 2023-06-20 at 22 22 44

@MarkoRisticSting
Copy link
Author

MarkoRisticSting commented Jun 21, 2023

Looks like x-typesense-api-key when sent as query param is not overriding default x-typesense-api-key, so my limit is not increased? @jasonbosco
Any idea?

Screenshot 2023-06-21 at 10 25 30

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

No branches or pull requests

2 participants