packages/easysearch_elasticsearch/lib/engine.js
/**
       * The ES query object used for searching the results.
       *
       * @param {Object} searchObject Search object
       * @param {Object} options      Search options
       *
       * @return array
       */
The ES query object used for searching the results.
@param {Object} searchObject Search object
@param {Object} options      Search options

@return array
The ES query object used for searching the results . @param { Object } searchObject Search object @param { Object } options Search options @return array
query(searchObject, options) {
        let query = {
          bool: {
            should: []
          }
        };
        _.each(searchObject, function (searchString, field) {
          query.bool.should.push({
            "fuzzy_like_this": {
              "fields": [field],
              "like_text": searchString
            }
          });
        });
        return query;
      }
query ( searchObject , options ) { let query = { bool : { should : [ ] } } ; _ . each ( searchObject , function ( searchString , field ) { query . bool . should . push ( { "fuzzy_like_this" : { "fields" : [ field ] , "like_text" : searchString } } ) ; } ) ; return query ; }
The ES query object used for searching the results.
The ES query object used for searching the results .