Class: OpenSearch::DSL::Search::Queries::Boosting

Inherits:
Object
  • Object
show all
Includes:
BaseComponent
Defined in:
lib/opensearch/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