queryTerm (term, offset = 0) {
const body = {
  from: offset,
  query: { match: {
    text: {
      query: term,
      operator: 'and',
      fuzziness: 'auto'
    } } },
  highlight: { fields: { text: {} } }
}

return client.search({ index, type, body })
}
/** Query ES index for the provided term */
Query ES index for the provided term
Query ES index for the provided term
queryTerm (term, offset = 0) {
const body = {
  from: offset,
  query: { match: {
    text: {
      query: term,
      operator: 'and',
      fuzziness: 'auto'
    } } },
  highlight: { fields: { text: {} } }
}
return client.search({ index, type, body })
}
queryTerm ( term , offset = 0 ) { const body = { from : offset , query : { match : { text : { query : term , operator : 'and' , fuzziness : 'auto' } } } , highlight : { fields : { text : { } } } } return client . search ( { index , type , body } ) }
Query ES index for the provided term
Query ES index for the provided term