Can searchSource's query use not only query_string


(whoami) #1

in kibana 5.x, from the source code we can see:

    function addToBody() {
      state.body = state.body || {};
      // ignore if we already have a value
      if (state.body[key] == null) {
        if (key === 'query' && _.isString(val)) {
          val = { query_string: { query: val }};
        }

        state.body[key] = val;
      }
    }

if we use searchSource.set('query', '#value#'), #value# will be used for query_string, if we wanna write some complex condition by dsl, how?


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.