we need tests about handling of potential duplicate entries in indexes

Bug #1004438 reported by Samuele Pedroni on 2012-05-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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

Stuart Langridge (sil) wrote :

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.

Rick McBride (rmcbride) on 2012-05-31
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.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers