we need tests about handling of potential duplicate entries in indexes
Bug #1004438 reported by
Samuele Pedroni
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
U1DB |
Confirmed
|
Medium
|
Unassigned |
Bug Description
right now it seems we dedupe duplicates index keys in indexes at the sql level at least, that's probably the behavior we want but there are no tests specifying and checking for this
Changed in u1db: | |
status: | New → Confirmed |
assignee: | nobody → Eric Casteleijn (thisfred) |
Changed in u1db: | |
assignee: | Eric Casteleijn (thisfred) → nobody |
To post a comment you must log in.
We need to decide whether a document can exist twice in the same index with the same index key, or not, and then enforce that behaviour with tests.
Ways a document might show up twice:
create_ index(" words", "splitwords( colours) ")
document: { colours: "red red red green blue" }
Should this document be in the index three times (one for each of "red", "green", "blue") or five?
create_ index(" name", "names")
document: { names: [ "aaron", "aaron", "andrew" ] }
Should this document be in the index twice (one for each of "aaron" and "andrew" ) or three times?
I personally think that indexes should be deduped: there should not be two identical entries (that is, two identical (indexkey, doc) pairs) in an index.