Skip to content

Commit

Permalink
fix: prevent missing payload error in UpdateFilterableAttributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Strift committed Feb 18, 2025
1 parent 37714fa commit 4ef68df
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions index_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package meilisearch
import (
"crypto/tls"
"encoding/json"
"github.com/stretchr/testify/require"
"testing"

"github.com/stretchr/testify/require"
)

func TestIndex_SearchWithContentEncoding(t *testing.T) {
Expand Down Expand Up @@ -137,7 +138,8 @@ func TestIndex_SearchWithContentEncoding(t *testing.T) {
require.NoError(t, err, "error unmarshalling raw got SearchResponse")
require.Equal(t, len(tt.Response.Hits), len(resp.Hits))

task, err := i.UpdateFilterableAttributes(&[]string{"tag"})
filterableAttrs := []string{"tag"}
task, err := i.UpdateFilterableAttributes(&filterableAttrs)
require.NoError(t, err)
testWaitForTask(t, i, task)

Expand Down Expand Up @@ -2015,15 +2017,15 @@ func TestIndex_SearchSimilarDocuments(t *testing.T) {
UID: "indexUID",
client: sv,
request: &SimilarDocumentQuery{
Id: "123",
Id: "123",
Embedder: "default",
},
resp: new(SimilarDocumentResult),
wantErr: false,
},
{
UID: "indexUID",
client: sv,
UID: "indexUID",
client: sv,
request: &SimilarDocumentQuery{
Embedder: "default",
},
Expand Down

0 comments on commit 4ef68df

Please sign in to comment.