picky 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.new)
19
+ @tokenizer = (options[:tokenizer] || Tokenizers::Default::Query)
20
20
  @weights = (options[:weights] || Weights.new)
21
21
  end
22
22
 
@@ -22,6 +22,8 @@ module Tokenizers
22
22
 
23
23
  # Split the text and put some back together.
24
24
  #
25
+ # TODO Make the same as in indexing?
26
+ #
25
27
  def pretokenize text
26
28
  split text
27
29
  end
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
- puts "\"#{text}\" is query tokenized as #{Tokenizers::Default::Query.tokenize(text).to_a.map(&:to_s).map(&:to_sym)}"
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)."
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 2
9
- version: 0.9.2
8
+ - 3
9
+ version: 0.9.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Florian Hanke