lib/tasks/try.rake in picky-0.9.2 vs lib/tasks/try.rake in picky-0.9.3
- old
+ new
@@ -13,10 +13,12 @@
desc "Try how a given word would be tokenized when querying."
task :query, [:text] => :application do |_, options|
text = options.text
- puts "\"#{text}\" is query tokenized as #{Tokenizers::Default::Query.tokenize(text).to_a.map(&:to_s).map(&:to_sym)}"
+ # TODO Text is destroyed.
+ #
+ puts "\"#{text}\" is query tokenized as #{Tokenizers::Default::Query.tokenize(text.dup).to_a.map(&:to_s).map(&:to_sym)}"
end
desc "Try the given text with both the index and the query (type:field optional)."
task :both, [:text, :type_and_field] => :application do |_, options|
text, type_and_field = options.text, options.type_and_field
\ No newline at end of file