-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
Issue Description
When using the MultiSearch method with Union: true, the TypeSense server returns search results in a field named hits in the response. However, the Go client appears to only look for a field named results, causing the response data to be inaccessible.
Steps to Reproduce
// Create boolean, string and integer values for parameters
unionTrue := true
queryString := "search term"
pageNum := 1
resultsPerPage := 20
multiSearchResp, err := client.MultiSearch(ctx, &api.MultiSearchParams{
Page: &pageNum,
PerPage: &resultsPerPage,
}, api.MultiSearchSearchesParameter{
Union: &unionTrue,
Searches: []api.MultiSearchCollectionParameters{
{
QueryBy: &queryString,
Q: &queryString,
Collection: &[]string{"collection-1"}[0],
},
{
QueryBy: &queryString,
Q: &queryString,
Collection: &[]string{"collection-2"}[0],
},
},
})Expected Behavior
The multiSearchResp should contain the search results accessible via a structured property.
Actual Behavior
The response contains the data in a field named hits, but the client doesn't properly map this field, making the search results inaccessible through the API.
edast, zyojv, fho and mmianl
Metadata
Metadata
Assignees
Labels
No labels