lib/picky/search.rb in picky-4.21.2 vs lib/picky/search.rb in picky-4.22.0
- old
+ new
@@ -136,11 +136,11 @@
# end
#
def boost boosts
@boosts = extract_boosts boosts
end
-
+
# Ignore given categories and/or combinations of
# categories.
#
# Example:
# search = Search.new(people) do
@@ -156,11 +156,11 @@
else
indexes.ignore_allocations allocation_or_category
end
end
end
-
+
# Exclusively keep combinations of
# categories.
#
# Example:
# search = Search.new(people) do
@@ -169,11 +169,11 @@
# end
#
def only *allocations_and_categories
indexes.keep_allocations *allocations_and_categories
end
-
+
# Ignore the given token if it cannot be matched to a category.
# The default behaviour is that if a token does not match to
# any category, the query will not return anything (since a
# single token cannot be matched). If you set this option to
# true, any token that cannot be matched to a category will be
@@ -234,15 +234,15 @@
# Execute a search using Query::Tokens.
#
# Note: Internal method, use #search to search.
#
def execute tokens, ids, offset, original_text = nil, unique = false
- Results.from original_text,
- ids,
- offset,
- sorted_allocations(tokens, @max_allocations),
- @extra_allocations,
- unique
+ Results.new original_text,
+ ids,
+ offset,
+ sorted_allocations(tokens, @max_allocations),
+ @extra_allocations,
+ unique
end
# Forwards the tokenizing to the query tokenizer.
#
# Parameters:
\ No newline at end of file