H
H
hbrmdc2015-06-14 17:12:03
NoSQL
hbrmdc, 2015-06-14 17:12:03

How to properly organize search in NoSql (Parse) database?

With the Parse API, fetching from a database is done like this:

getSearchResults: function(callback) {
    var query = new Parse.Query('ClassName');
    query.descending("createdAt"); // порядок
    query.lessThanOrEqualTo(key, value); // фильтр #1
    query.contains(key, substring); // фильтр #2 и т.д. до 15 фильтров.
    query.find({
      success: function(items) { 
        callback(items);
      },
      error: function(obj, err) {
        console.error('getAllNewEstate() error', obj, err);
      }
    });
  }

1. Is this structure suitable for users to search the catalog by product features, or is it better to think about indexing?
2. If it is suitable, then tell me, please, how to properly organize the transfer of filters specified by the user to this structure?
ReactJS, Flux

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question