You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Equality query on an indexed string property returns prefix matches #206
On main (efacaf4): with a B-Tree index on a string property, an equality lookup also returns documents whose value starts with the searched string.
// 100 docs: Name = "p0" .. "p99"db.PeopleV2.AsQueryable().Where(p =>p.Name=="p7").ToList().Count;// 1 (no index)awaitdb.PeopleV2.CreateIndexAsync(p =>p.Name,"idx_Name",unique:false);// same with unique: truedb.PeopleV2.AsQueryable().Where(p =>p.Name=="p7").ToList().Count;// 11: p7, p70..p79(awaitdb.PeopleV2.QueryIndexAsync("idx_Name","p7","p7").ToListAsync()).Count;// 11
The unique-constraint check is not affected: inserting "p7" after "p70" into a unique index is accepted. The bug seems to be in the range scan's end-bound comparison for string keys (a prefix compare instead of an exact one). The indexed LINQ path also returns these matches without re-checking the predicate.
Activity
fix(index): match only the exact value in string index range bounds (#…
test(index): expect BLiteValidationException for unique violations in…
fix(collections): don't roll back a caller-owned transaction on a fai…