typesense / typesense-go

Go client for Typesense: https://github.com/typesense/typesense
Apache License 2.0
208 stars 55 forks source link

Add support for stopwords, metrics & stats #179

Closed phiHero closed 1 month ago

phiHero commented 1 month ago

Change Summary

Also fix some bugs in multi-search integration test

Create or update a stopwords set

    stopwords := &api.StopwordsSetUpsertSchema{
        Locale:    pointer.String("en"),
        Stopwords: []string{"Germany", "France", "Italy", "United States"},
    }
    client.Stopwords().Upsert(context.Background(), "stopword_set1", stopwords)

Retrieve a stopwords set

client.Stopword("stopword_set1").Retrieve(context.Background())

List all stopwords sets

client.Stopwords().Retrieve(context.Background())

Delete a stopwords set

client.Stopword("stopword_set1").Delete(context.Background())

Cluster Metrics

client.Metrics().Retrieve(context.Background())

API Stats

client.Stats().Retrieve(context.Background())

PR Checklist