Skip to content

MultiSearch no longer callable #2285

@prarie

Description

@prarie

We use MultiSearch in order to call only the indexes that need to be called based on the type of items we're querying in our system.

With commit b744df2 that changed the MultiSearch func spec, our code no longer works because the third param is not creatable externally and fails because it doesn't check for nil of the param like it used to.

Before change:

func MultiSearch(ctx context.Context, req *SearchRequest, preSearchData map[string]map[string]interface{}, indexes ...Index) (*SearchResult, error) {

After change:

func MultiSearch(ctx context.Context, req *SearchRequest, params *multiSearchParams, indexes ...Index) (*SearchResult, error) {

This always fails when called externally with indexes provided because this check always panics because the value of params can only be passed in as nil:

if params.preSearchData != nil {

Is this intentional?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions