lib/search_flip/criteria.rb in search_flip-2.0.0.beta3 vs lib/search_flip/criteria.rb in search_flip-2.0.0.beta4

- old
+ new

@@ -43,12 +43,12 @@ criteria.terminate_after_value = other.terminate_after_value unless other.terminate_after_value.nil? criteria.timeout_value = other.timeout_value unless other.timeout_value.nil? criteria.offset_value = other.offset_value if other.offset_value criteria.limit_value = other.limit_value if other.limit_value criteria.scroll_args = other.scroll_args if other.scroll_args + criteria.source_value = other.source_value if other.source_value - criteria.source_value = (criteria.source_value || []) + other.source_value if other.source_value criteria.sort_values = (criteria.sort_values || []) + other.sort_values if other.sort_values criteria.includes_values = (criteria.includes_values || []) + other.includes_values if other.includes_values criteria.preload_values = (criteria.preload_values || []) + other.preload_values if other.preload_values criteria.eager_load_values = (criteria.eager_load_values || []) + other.eager_load_values if other.eager_load_values criteria.search_values = (criteria.search_values || []) + other.search_values if other.search_values @@ -120,11 +120,11 @@ scopes = scopes.to_set fresh.tap do |criteria| criteria.search_values = nil if scopes.include?(:search) - criteria.post_search_values = nil if scopes.include?(:search) + criteria.post_search_values = nil if scopes.include?(:post_search) criteria.sort_values = nil if scopes.include?(:sort) criteria.hightlight_values = nil if scopes.include?(:highlight) criteria.suggest_values = nil if scopes.include?(:suggest) criteria.custom_values = nil if scopes.include?(:custom) criteria.aggregation_values = nil if scopes.include?(:aggregate) @@ -373,11 +373,13 @@ # Use to specify which fields of the source document you want ElasticSearch # to return for each matching result. # # @example # CommentIndex.source([:id, :message]).search("hello world") + # CommentIndex.source(exclude: "description") + # CommentIndex.source(false) # - # @param value [Array] Array listing the field names of the source document + # @param value Pass any allowed value to restrict the returned source # # @return [SearchFlip::Criteria] A newly created extended criteria def source(value) fresh.tap do |criteria|