class Boolminot::Clauses::Compounds::AtLeast

Private Instance Methods

to_elasticsearch_in_filter_context() click to toggle source
# File lib/boolminot/clauses/compounds/at_least.rb, line 22
def to_elasticsearch_in_filter_context
  to_disjunction.to_elasticsearch(context: :filter)
end
to_elasticsearch_in_query_context() click to toggle source
# File lib/boolminot/clauses/compounds/at_least.rb, line 13
def to_elasticsearch_in_query_context
  {
    bool: {
      should: clauses.map { |c| c.to_elasticsearch(context: :query) },
      minimum_should_match: amount
    }
  }
end