typesense / typesense-go

Go client for Typesense: https://github.com/typesense/typesense
Apache License 2.0
220 stars 56 forks source link

wrong type on an attribute in the *SearchCollectionParams struct #123

Closed WahidinAji closed 1 year ago

WahidinAji commented 2 years ago

Description

I try to search the collection by param. but got an error

Steps to reproduce

I follow this instruction, but I think there is an error type on the SearchCollectionParams struct image

on the sample, the QueryBy uses a string-array, such as

QueryBy []string

but, when I go to the struct, the type is just string not array-string

QueryBy string

image

So, in that case. I must uses only string like

QueryBy: "field"

and can't uses array-string

QueryBy: []string{"field_1", "field_2"}

Typsense Version:

{
    "state": 1,
    "version": "0.24.0.rcn13"
}

OS: Ubuntu 22.04.1 LTS x86_64

kishorenc commented 1 year ago

Fixed by https://github.com/typesense/typesense-go/pull/122