I'm also working on a noSQL database. What I'm struggling with is the abstraction for searches/filters. For example, if you want to get all books with "beginner" in the title, in SQL it would look something like: "SELECT * FROM books WHERE title LIKE %beginner%" Where in no-SQL it would look like book.filter({title: ["like", "beginner"]}); Any ideas on how to abstract the filtering in a more clear way?
r.table('books').filter(function(doc){
return doc('title').match("beginner")
})
Or like this: r.table('books').filter(r.doc('title').match("beginner"))
Or if you have a secondary index setup correctly, this could work: r.table('books').getAll("beginner", {index: "title"})