AnsweredAssumed Answered

Ability to Sort when using the MapR-DB JSON OJAI API

Question asked by ryanvictory on Apr 17, 2017
Latest reply on Apr 17, 2017 by ryanvictory

Hello,

 

We are using MapR-DB for a realtime system, along with using it to store backing data for our Web UI that interfaces with that system. What we have found is that the OJAI API for MapR-DB JSON tables is lacking a few key features for its use in more operational systems. One of those features is the ability to sort data during a query.

 

We are using the OJAI API (MapR DB Client 5.2.0-mapr API ) and are using the "find" method on Table in order to use a QueryCondition to retrieve records. The issue is that we end up retrieving all records that match the condition in the order of the _id fields. As an example, if we were to have a table of "logs" and want to sort on "Log Title," today I would have to stream every single log into memory (using the OJAI API) and perform the sort in memory before sending to the client's Web UI.

 

Is there something we are missing in the OJAI API that would allow us to have MapR-DB perform the Sort before sending the results? If not, is this a feature that can be requested?

Outcomes