fix: breaking changes with meili (#5073)
resolves breaking changes introduced in #5058 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5073 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com> Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
This commit is contained in:
parent
3dbeafa7ba
commit
d48b936126
3 changed files with 3 additions and 16 deletions
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
// Indexer represents a basic meilisearch indexer implementation
|
||||
type Indexer struct {
|
||||
Client *meilisearch.Client
|
||||
Client meilisearch.ServiceManager
|
||||
|
||||
url, apiKey string
|
||||
indexName string
|
||||
|
@ -40,10 +40,7 @@ func (i *Indexer) Init(_ context.Context) (bool, error) {
|
|||
return false, fmt.Errorf("indexer is already initialized")
|
||||
}
|
||||
|
||||
i.Client = meilisearch.NewClient(meilisearch.ClientConfig{
|
||||
Host: i.url,
|
||||
APIKey: i.apiKey,
|
||||
})
|
||||
i.Client = meilisearch.New(i.url, meilisearch.WithAPIKey(i.apiKey))
|
||||
|
||||
_, err := i.Client.GetIndex(i.VersionedIndexName())
|
||||
if err == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue