major performance improvements map
This commit is contained in:
30
db/migrations/1744651602_add_polyline.go
Normal file
30
db/migrations/1744651602_add_polyline.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/meilisearch/meilisearch-go"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
func init() {
|
||||
client := meilisearch.New(os.Getenv("MEILI_URL"), meilisearch.WithAPIKey(os.Getenv("MEILI_MASTER_KEY")))
|
||||
|
||||
m.Register(func(app core.App) error {
|
||||
searchableAttributes := []string{
|
||||
"author_name",
|
||||
"name",
|
||||
"description",
|
||||
"location",
|
||||
"tags",
|
||||
}
|
||||
client.Index("trails").UpdateSearchableAttributes(&searchableAttributes)
|
||||
|
||||
return nil
|
||||
}, func(app core.App) error {
|
||||
// add down queries...
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user