Questions tagged [reql]

ReQL is the RethinkDB query language. It offers a convenient way to manipulate JSON documents.

ReQL is the RethinkDB query language. It offers a convenient way to manipulate JSON documents.

http://www.rethinkdb.com/docs/introduction-to-reql/

99 questions
0
votes
0 answers

Calculate total sum of dates stored in array in rehtinkdb

I have date objects which are stored in array. I want to calculate sum of all these dates by rethinkdb query my data is stored in JSON. The array size can vary.
DEO
  • 316
  • 2
  • 4
  • 18
0
votes
1 answer

Retrieving posts with user information in rethinkdb

Im working on some sort of social network in which people are able to make posts about a topic and like them. Im having trouble tracking user likes. The schema is the following: Users: { userId: "someId", likes: ["idPost1", "idPost4", ...]…
Fabio Espinosa
  • 880
  • 6
  • 14
0
votes
1 answer

RethinkDb Join array in object with objects

I'm using rethinkdb with JS. I have a rethinkdb table 'users'. One user object looks like this: { id: '1', friends: [ '2', '4' ], items: [ { id: '1', name: 'test item 1' } ] } A user is allowed to see all items…
0
votes
1 answer

.getField() returning empty result

Using the RethinkdbDash package for Node.js and Rethink, I'm able to use this ReQL: r.db('').table('').get('') ...to get the desired object out of the database with the following format... { "address": …
m_callens
  • 6,100
  • 8
  • 32
  • 54
0
votes
1 answer

RethinkDB Dynamic Query Tracing

So I have a dynamic query and I'm wondering is there a way to trace what statement its exactly executing for tracing purposes? r.db('appname').table('food') .hasFields({'fruits': {'secondary': true}}) .filter(function(row) { var…
Woppi
  • 5,303
  • 11
  • 57
  • 81
0
votes
2 answers

RethinkDB - how to filter records where attribute matches a list / array

RethinkDB I want to fetch all the records which have a particular field/attribute matching one of 3 different possible values. In the example below, I want to see all the records who have status equal to 'Ready', 'Active', or 'Something else' I…
kris
  • 11,868
  • 9
  • 88
  • 110
0
votes
1 answer

RethinkDB filtering Object Array

I'm new to rethinkdb and I wanted to filter something like... get all with Kiwi or Strawberry as preferred fruit { "id": "65dbaa34-f7d5-4a25-b01f-682032fc6e05" , "fruits": { "favorite": "Mango" , "preferred": [ …
Woppi
  • 5,303
  • 11
  • 57
  • 81
0
votes
1 answer

RethinkDB, Efficently Limit Results By Field

I'm trying to limit results for each user_id field. For example, I have a list of users Ids and i want to limit 2 friends per user from the friends selection set. Table: users { name: String, surname: String } Table: friends { user_id:…
Fabrizio Fenoglio
  • 5,767
  • 14
  • 38
  • 75
0
votes
1 answer

RethinkDB update field inside nested array->obj

Here is how my row looks like: {"id": x , "data": [ { "someId": 1 , "url": https://twitter.com/HillaryClinton?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor, » } , { "someId": 2 , "url":…
Nema Ga
  • 2,450
  • 4
  • 26
  • 49
0
votes
1 answer

rethinkdb: get rows created no later than two weeks from now with unique id

I have a table with some rows that look like this: { "id": "12345" "created_date": Fri May 27 2016 22:06:25 GMT+00:00 , } { "id": "6789" "created_date": Mon May 30 2016 07:48:35 GMT+00:00 , } etc... I am attempting to first filter the…
ApathyBear
  • 9,057
  • 14
  • 56
  • 90
0
votes
1 answer

Creating Points from existing data in Rethinkdb

I'm importing data from a file into Rethinkdb. the data looks like this (this is fake data) [ { "firstName": "Keeley", "lastName": "Leannon", "createdAt": "2016-05-10T19:55:38.823Z", "location": { "lat": 52, "lng":…
MrBliz
  • 5,830
  • 15
  • 57
  • 81
0
votes
2 answers

REQL - Using Filter with (regex) Match, and then Pluck from a list in a nested hash

Getting in to REQL has been really difficult. It seemed intuitive at first from a straight up equals match standpoint, but gets really hard all of a sudden when I need to match data to a regular expression, and in a list. Then I also want to pull…
Locane
  • 2,886
  • 2
  • 24
  • 35
0
votes
1 answer

RethinkDB filtering speed

In my testing on rethinkdb, i have inserted 14 millions data into a table. Sample data inserted - {"name": "jason" , "id" : "1", "email": "jason@gmail.com", ...} id was generated by counter of 14 millions When i tried to filter the table by using…
yhtan
  • 71
  • 1
  • 2
  • 7
0
votes
1 answer

RethinkDB index query with several .contains()

I have the following query that works fine but is slow, however I can't figure out how to index it properly: r.db('my_db') .table('messages') .filter({ community_id : community.id}) .filter(function(row){ return…
jesperado
  • 25
  • 3
0
votes
1 answer

Rethinkdb between with multiple keys

I've the following structrue : Item { id string, title string tags []string, time int, parent string } What i want, list all items with tags [tag1, tag2, ... etc] of parent "parent-1" and order by time So i did…