fixes index filterable attributes & auto trail upload

This commit is contained in:
Christian Beutel
2024-06-07 15:06:32 +02:00
parent ad5a4e668b
commit ccb7a4cd3a
11 changed files with 88 additions and 42 deletions

View File

@@ -19,10 +19,18 @@ func init() {
})
m.Register(func(db dbx.Builder) error {
_, err := client.Index("trails").UpdateFilterableAttributes(&[]string{
"_geo", "author", "category", "completed", "date", "difficulty", "distance", "elevation_gain", "public", "shares",
})
if err != nil {
return err
}
dao := daos.New(db)
var usernames []string
err := db.NewQuery("SELECT username FROM users").Column(&usernames)
err = db.NewQuery("SELECT username FROM users").Column(&usernames)
if err != nil {
return err