when doing a query using a prefix match on startkey = [1,“superman”], endkey = [9,“superman”] will actually not give you all the superman documents but all the documents, because [3,“batman”] is key ordering wise below [4,“superman”] because 3 < 4 and we only do a prefix match.
What you would need to do is inverse the key [“superman”, 1], [“superman”, 4], [“batman”,3],…. Now if you query for prefix [“superman”] you will get both superman results.