Skip to content

Commit

Permalink
Merge #524
Browse files Browse the repository at this point in the history
524: Alligned `SearchRequest.Vector` type to `[]float32` r=curquiza a=LGXerxes

# Pull Request

## Related issue
Fixes -

## What does this PR do?
- Changes the type of `SearchRequest.Vector` to a `[]float32`, as it aligns more with meilisearch and general embedding vectors.

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: LGXerxes <[email protected]>
  • Loading branch information
meili-bors[bot] and structwafel authored Apr 29, 2024
2 parents cd67941 + 74246b9 commit b601862
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion index_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ func TestIndex_SearchWithVectorStore(t *testing.T) {
client: defaultClient,
query: "Pride and Prejudice",
request: SearchRequest{
Vector: []float64{0.1, 0.2, 0.3},
Vector: []float32{0.1, 0.2, 0.3},
Hybrid: &SearchRequestHybrid{
SemanticRatio: 0.5,
Embedder: "default",
Expand Down
2 changes: 1 addition & 1 deletion types.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ type SearchRequest struct {
Facets []string
PlaceholderSearch bool
Sort []string
Vector []float64
Vector []float32
HitsPerPage int64
Page int64
IndexUID string
Expand Down
10 changes: 5 additions & 5 deletions types_easyjson.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b601862

Please sign in to comment.