deepstreamIO / deepstream.io-provider-search-rethinkdb

A data-provider that makes every table searchable via rethinkdb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Complex search queries cause primary key to be too long

roark opened this issue · comments

commented

Hi Deepstream Team,

I've been integrating this provider and came across an issue in regards to query length. Once I started building slightly more complex queries (more than 5 conditions) I began to see:

storage:ReqlQueryLogicError: Primary key too long (max 127 characters)

It appears the creation of a list's primary id is composed of the stringified query. Therefore, with any longer query we begin bumping into issues with the 127 max allowed by RethinkDB.

Do you have any ideas on how to best handle this? Possibly rather than using the stringified query as the list's primary id maybe it should be a SHA of it?

commented

I tried using the recordOptions => { persist: false } on my initial call from the client.

ds.record.getList( 'search?' + queryString, { persist: false } )

But unfortunately to no avail.

It seems like this may have been a decent solution, since I don't personally need the list to persist in storage.