I have a data scheme that looks like this:
{
"datetime": "1453845345493",
"someIds": ["id2000-4", "id1000-34"]
}
If the array someIdscan contain many different values.
Filtering based on a single identifier using the following query works without problems and returns approximately 400 results. (I also plan to implement the correct indexes, but at the moment I'm testing a simpler case.)
r.db("dbName").table("tableName")
.filter(r.row("datetime").gt(1453845340493))
.filter(function(someVal){
return someVal("someIds").contains("id2000-4");
})
.count()
But trying to follow the last example in the documentation “contains” , where it is recommended to use the predicate function to simulate the output of 'or' nothing, when it should return a superset above:
r.db("dbName").table("tableName")
.filter(r.row("datetime").gt(1453845340493))
.filter(function(someVal){
return r.expr(["id2000-4", "id1000-77"]).contains(someVal("someIds"));
})
.count()
, , . RethinkDB v2.2.3-1, . ?