Class: Sunspot::Query::Restriction::AnyOf

Inherits:
Base
  • Object
show all
Defined in:
lib/sunspot/query/restriction.rb

Overview

Results must have field with value included in given collection

Constant Summary

Constants inherited from Base

Base::RESERVED_WORDS

Instance Method Summary collapse

Methods inherited from Base

#initialize, #negate, #to_boolean_phrase, #to_negated_boolean_phrase, #to_params, #to_positive_boolean_phrase

Methods included from Filter

#tag, #to_filter_query

Constructor Details

This class inherits a constructor from Sunspot::Query::Restriction::Base

Instance Method Details

#negated?Boolean

Returns:

  • (Boolean)


306
307
308
309
310
311
312
# File 'lib/sunspot/query/restriction.rb', line 306

def negated?
  if @value.empty?
    false
  else
    super
  end
end