Closed HeavyHorst closed 7 years ago
When i change the value of an indexed field and search for the old value, i still get results.
package main import ( "fmt" "log" "github.com/timshannon/bolthold" ) type Person struct { Name string Division string `boltholdIndex:"Division"` } var p1 = Person{"Hermann", "Division1"} func main() { store, err := bolthold.Open("hold.db", 0666, nil) if err != nil { log.Fatalln(err) } store.Insert(p1.Name, p1) p1.Division = "test123" store.Update(p1.Name, p1) var result []Person err = store.Find(&result, bolthold.Where("Division").Eq("Division1")) fmt.Println(result) }
The result is:
go run test.go [{Hermann test123}]
Yep, confirmed. I'm working on a fix.
Thanks for the report.
Fixed in the latest master. Thanks again for the catch.
When i change the value of an indexed field and search for the old value, i still get results.
The result is: