fix bug in example golang code in graphql.filters.bm25 #3104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's being changed:
The example golang code for keyword searching could not run properly, we fix some syntax error so that it could work.
The error message of the original code is as follows:
./main.go:30:12: invalid composite literal type string
./main.go:31:3: label properties defined and not used
./main.go:31:15: non-name []string{…} on left side of :=
./main.go:32:11: assignment mismatch: 2 variables but client.GraphQL().Bm25ArgBuilder().WithQuery(query).WithProperties returns 1 value
./main.go:34:20: undefined: properties
./main.go:41:5: client.GraphQL().Get().WithClassName(className).WithFields(title, _additional).WithBm25 undefined (type *graphql.GetBuilder has no field or method WithBm25, but does have method WithBM25)
Type of change:
How Has This Been Tested?
yarn start