picky 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/picky/query/base.rb +1 -1
- data/lib/picky/tokenizers/query.rb +2 -0
- data/lib/tasks/try.rake +3 -1
- metadata +2 -2
data/lib/picky/query/base.rb
CHANGED
@@ -16,7 +16,7 @@ module Query
|
|
16
16
|
options = Hash === index_types.last ? index_types.pop : {}
|
17
17
|
@index_types = index_types
|
18
18
|
@weigher = Weigher.new index_types
|
19
|
-
@tokenizer = (options[:tokenizer] || Tokenizers::Query
|
19
|
+
@tokenizer = (options[:tokenizer] || Tokenizers::Default::Query)
|
20
20
|
@weights = (options[:weights] || Weights.new)
|
21
21
|
end
|
22
22
|
|
data/lib/tasks/try.rake
CHANGED
@@ -15,7 +15,9 @@ namespace :try do
|
|
15
15
|
task :query, [:text] => :application do |_, options|
|
16
16
|
text = options.text
|
17
17
|
|
18
|
-
|
18
|
+
# TODO Text is destroyed.
|
19
|
+
#
|
20
|
+
puts "\"#{text}\" is query tokenized as #{Tokenizers::Default::Query.tokenize(text.dup).to_a.map(&:to_s).map(&:to_sym)}"
|
19
21
|
end
|
20
22
|
|
21
23
|
desc "Try the given text with both the index and the query (type:field optional)."
|