From 65e6c377ae03b495188a8ea06b942a58f13c0c85 Mon Sep 17 00:00:00 2001 From: Hayden Date: Tue, 23 Jul 2024 10:13:47 +0700 Subject: [PATCH] update README: stopwords, metrics & stats --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index c663c15..44a4942 100644 --- a/README.md +++ b/README.md @@ -399,6 +399,34 @@ client.Collection("products").Synonyms().Retrieve(context.Background()) client.Collection("products").Synonym("coat-synonyms").Delete(context.Background()) ``` +### Create or update a stopwords set + +```go + 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 + +```go +client.Stopword("stopword_set1").Retrieve(context.Background()) +``` + +### List all stopwords sets + +```go +client.Stopwords().Retrieve(context.Background()) +``` + +### Delete a stopwords set + +```go +client.Stopword("stopword_set1").Delete(context.Background()) +``` + ### Create or update a preset ```go @@ -445,6 +473,18 @@ client.Operations().Snapshot(context.Background(), "/tmp/typesense-data-snapshot client.Operations().Vote(context.Background()) ``` +### Cluster Metrics + +```go +client.Metrics().Retrieve(context.Background()) +``` + +### API Stats + +```go +client.Stats().Retrieve(context.Background()) +``` + ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/typesense/typesense-go.