RethinkDB Python In-list example

Connect to the database:

import rethinkdb as r
r.connect("127.0.0.1", 28015).repl()
db = r.db("search")

Filter using match:

table.filter(lambda r: r["rank"] in (2,3,4)).count().run()

Note that unlike SQL, the column headers are case sensitive. It appears that the regular expression must match the entire string.