Slackbot
12/15/2023, 11:54 AMKishore Nallan
12/15/2023, 12:21 PMKishore Nallan
12/15/2023, 12:42 PMMd.Riad Hasan Sarker
12/15/2023, 1:24 PM//collection schema
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "title",
"optional": false,
"sort": false,
"type": "string"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "order_idx",
"optional": true,
"sort": true,
"type": "int32"
},
{
"facet": true,
"index": true,
"infix": false,
"locale": "",
"name": "taxonomy.verticals",
"optional": true,
"sort": false,
"type": "string[]"
},
{
"facet": true,
"index": true,
"infix": false,
"locale": "",
"name": "taxonomy.segments",
"optional": true,
"sort": false,
"type": "string[]"
}
//search query
q:
query_by: title
sort_by: order_idx:desc
group_by: taxonomy.segments
group_limit: 4
page: 1Kishore Nallan
12/15/2023, 1:44 PMKishore Nallan
12/15/2023, 1:59 PMMd.Riad Hasan Sarker
12/15/2023, 2:02 PM//sample documents
[
{
"title":"spoken english",
"order_idx":1,
"taxonomy.verticals":[
"skills"
],
"taxonomy.segments":[
"language_learning",
"skills_development"
]
},
{
"title":"ielts",
"order_idx":2,
"taxonomy.verticals":[
"skills"
],
"taxonomy.segments":[
"language_learning",
"free",
"career"
]
}
]Md.Riad Hasan Sarker
12/15/2023, 2:05 PMKishore Nallan
12/15/2023, 2:12 PMKishore Nallan
12/15/2023, 2:13 PMMd.Riad Hasan Sarker
12/15/2023, 2:24 PMgithub.com/typesense/typesense-go v0.8.0Md.Riad Hasan Sarker
12/15/2023, 2:24 PMjson: cannot unmarshal array into Go struct field SearchGroupedHit.grouped_hits.group_key of type stringMd.Riad Hasan Sarker
12/15/2023, 2:25 PMresult, err := TypesenseClient.Collection(collectionName).Documents().Search(searchParams)
if err != nil {
fmt.Println("error", err) // here i got the error
}Kishore Nallan
12/15/2023, 2:31 PMv0.9.0 that I just published.Md.Riad Hasan Sarker
12/15/2023, 2:37 PM