typesense / typesense-js

JavaScript / TypeScript client for Typesense
https://typesense.org/docs/api
Apache License 2.0
414 stars 75 forks source link

allowed types for SearchParams['query_by'] don't match documentation #120

Closed olve closed 2 years ago

olve commented 2 years ago

Description

according to docs, SearchParams['query_by'] accepts string arrays, however the type-definitions provided are limited to string only.

jasonbosco commented 2 years ago

@olve The docs say "One or more string / string[] fields that should be queried against. Separate multiple fields with a comma: company_name, country".

So the actual value for query_by needs to be a comma separated string (not an array). It's just that the data type for the field names used in the query_by param can be strings or arrays of strings.