app/models/concerns/searchable.rb
# Override in your host app model to specify field search and match behavior
Override in your host app model to specify field search and match behavior
Override in your host app model to specify field search and match behavior
def elasticsearch_query(query)
      {
        query: {
          match: {
            _all: sanitize_query(query)
          }
        },
        highlight: {
          fields: { '*' => {} },
          require_field_match: false,
          pre_tags: ['|highlight|'],
          post_tags: ['|/highlight|']
        }
      }
    end
def elasticsearch_query ( query ) { query : { match : { _all : sanitize_query ( query ) } } , highlight : { fields : { '*' => { } } , require_field_match : false , pre_tags : [ '|highlight|' ] , post_tags : [ '|/highlight|' ] } } end
Override in your host app model to specify field search and match behavior
Override in your host app model to specify field search and match behavior
# multi_match: { #   query: sanitize_query(query), #   fields: fields_to_search # }
query
<not_specific>