lib/mebla/search.rb in mebla-1.1.1 vs lib/mebla/search.rb in mebla-1.1.2
- old
+ new
@@ -166,9 +166,25 @@
@slingshot_search = @slingshot_search.filter(:terms, field)
end
self
end
+ # Sets the maximum number of hits per query, defaults to 10
+ # @param [Integer] value
+ # @return [Mebla::Search]
+ def size(value)
+ @slingshot_search = @slingshot_search.size(value)
+ self
+ end
+
+ # Sets the starting offset for the query
+ # @param [Integer] value
+ # @return [Mebla::Search]
+ def from(value)
+ @slingshot_search = @slingshot_search.from(value)
+ self
+ end
+
# Performs the search and returns the results
# @return [Mebla::ResultSet]
def hits
return @results if @results
# Log search query
\ No newline at end of file