Closed angrz closed 8 years ago
Do you mean matching keys when adding to indexes?
This is not currently. Perhaps I could add an options to CreateIndex that allow for specifying case-insensitive pattern matching. Would something like this work?
opts := buntdb.IndexOptions{
CaseInsensitiveKeyMatching: true,
}
buntdb.CreateIndexOptions("myindex", "user:*", &opts, buntdb.IndexString)
Exactly, that would be great
I just pushed this feature to the master branch. It works as described above with the exception that the index must be created in a transaction:
db.Update(func(tx *buntdb.Tx) error{
opts := buntdb.IndexOptions{
CaseInsensitiveKeyMatching: true,
}
return tx.CreateIndexOptions("myindex", "user:*", &opts, buntdb.IndexString)
})
Hi, is it possible to match key+"*" in case insensitive mode? Thanks