Class: Elasticsearch::DSL::Search::Queries::Boosting

Inherits:
Object
  • Object
show all
Includes:
BaseComponent
Defined in:
lib/elasticsearch/dsl/search/queries/boosting.rb

Overview

A query which will decrease the score of documents matching the ‘negative` query

Examples:


search do
  query do
    boosting do
      positive terms: { amenities: ['wifi', 'pets'] }
      negative terms: { amenities: ['pool'] }
      negative_boost 0.5
    end
  end
end

See Also:

Method Summary

Methods included from BaseComponent

included, #initialize