Skip to content

Commit

Permalink
update README: stopwords, metrics & stats
Browse files Browse the repository at this point in the history
  • Loading branch information
phiHero committed Jul 23, 2024
1 parent 6294d16 commit 65e6c37
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 65e6c37

Please sign in to comment.