picky 4.19.7 → 4.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e7cf9a9dd401352cb45733562228ade08f98b8a
4
- data.tar.gz: 14efc542f26873245bb0d8109a5ca9556d959573
3
+ metadata.gz: c5704e07276164090e6059d313cc0be35daeca92
4
+ data.tar.gz: 81083e451a334a22e710044eef8b97447670ee5e
5
5
  SHA512:
6
- metadata.gz: b23faadc063f71af185b9baa95524264cb2dccc7c68dba1091ddf9ce0485c65dd76e87384b9d9f55bf3e6e8b22712bab9c8f5e3547783c6f6bb4be8ed0a62ab7
7
- data.tar.gz: e750306b548f029d83664383b5747850c3108003b13cfc718746cf18f295f1af27474d694fab74f7be17f6690ff99b6bbb8b5637411565720354960f306c6d5a
6
+ metadata.gz: 37927091e857d0b01a531154e1b6edcb6c991a8e7099fafd17d9e4062c1dab6d92c1e14a6dddce803a9390ec02185574dcc323cf471a2bfdfd6a748f85a71d03
7
+ data.tar.gz: f592ef7f8c96e5c80fbfdb29a7f3e1883b74888589bf442320312af6542a64e23657d77b440548251f9d5bdcb13570f84b475a63c2b1e600577dff27d09003c0
@@ -20,8 +20,12 @@ module Picky
20
20
 
21
21
  # Loads the index hash from json format.
22
22
  #
23
+ # Also ensures all hash keys are frozen.
24
+ #
23
25
  def load
24
26
  MultiJson.decode ::File.open(cache_path, 'r') # , symbolize_keys: true # SYMBOLS.
27
+ # index_hash && index_hash.each { |(key, value)| key.freeze }
28
+ # index_hash
25
29
  end
26
30
 
27
31
  # Dumps the index internal backend in json format.
@@ -57,7 +57,7 @@ module Picky
57
57
  ::File.open(cache_path, 'r:utf-8') do |file|
58
58
  file.each_line do |line|
59
59
  id, token = line.split ?,, 2
60
- yield id, (token.chomp! || token)
60
+ yield id.freeze, (token.chomp! || token).freeze
61
61
  end
62
62
  end
63
63
  end
data/lib/picky/bundle.rb CHANGED
@@ -163,6 +163,18 @@ module Picky
163
163
  def index_path type = nil
164
164
  ::File.join index_directory, "#{category.name}_#{name}#{ "_#{type}" if type }"
165
165
  end
166
+
167
+ def to_tree_s indent = 0, &block
168
+ s = <<-TREE
169
+ #{' ' * indent}#{self.class.name.gsub('Picky::','')}(#{name})
170
+ #{' ' * indent} Inverted(#{inverted.size})[#{backend_inverted}]#{block && block.call(inverted)}
171
+ #{' ' * indent} Weights (#{weights.size})[#{backend_weights}]#{block && block.call(weights)}
172
+ #{' ' * indent} Similari(#{similarity.size})[#{backend_similarity}]#{block && block.call(similarity)}
173
+ #{' ' * indent} Realtime(#{realtime.size})[#{backend_realtime}]#{block && block.call(realtime)}
174
+ #{' ' * indent} Configur(#{configuration.size})[#{backend_configuration}]#{block && block.call(configuration)}
175
+ TREE
176
+ s.chomp
177
+ end
166
178
 
167
179
  def to_s
168
180
  "#{self.class}(#{identifier})"
@@ -44,25 +44,36 @@ module Picky
44
44
 
45
45
  # Returns a reference to the array where the id has been added.
46
46
  #
47
- def add id, str_or_sym, where = :unshift
48
- # Use a generalized strategy.
49
- #
50
- str_or_syms = @realtime[id] ||= []
51
-
52
- # Inverted.
47
+ # Does not add to realtime if static.
48
+ #
49
+ def add id, str_or_sym, where = :unshift, static = false
50
+
51
+ # If static, indexing will be slower, but will use less
52
+ # space in the end.
53
53
  #
54
- ids = if str_or_syms.include? str_or_sym
54
+ if static
55
55
  ids = @inverted[str_or_sym] ||= []
56
- ids.delete id
57
- ids.send where, id
56
+ ids.send where, id unless ids.include? id
58
57
  else
59
- # Update the realtime index.
58
+ # Use a generalized strategy.
60
59
  #
61
- str_or_syms << str_or_sym
62
- ids = @inverted[str_or_sym] ||= []
63
- ids.send where, id
64
- end
60
+ str_or_syms = (@realtime[id] ||= []) # (static ? nil : []))
65
61
 
62
+ # Inverted.
63
+ #
64
+ ids = if str_or_syms && str_or_syms.include?(str_or_sym)
65
+ ids = @inverted[str_or_sym] ||= []
66
+ ids.delete id
67
+ ids.send where, id
68
+ else
69
+ # Update the realtime index.
70
+ #
71
+ str_or_syms << str_or_sym # unless static
72
+ ids = @inverted[str_or_sym] ||= []
73
+ ids.send where, id
74
+ end
75
+ end
76
+
66
77
  # Weights.
67
78
  #
68
79
  @weights[str_or_sym] = self.weight_strategy.weight_for ids.size
@@ -93,9 +104,9 @@ module Picky
93
104
 
94
105
  # Partializes the text and then adds each.
95
106
  #
96
- def add_partialized id, text, where = :unshift
107
+ def add_partialized id, text, where = :unshift, static = false
97
108
  partialized text do |partial_text|
98
- add id, partial_text, where
109
+ add id, partial_text, where, static
99
110
  end
100
111
  end
101
112
  def partialized text, &block
@@ -71,6 +71,10 @@ module Picky
71
71
  def to_stats
72
72
  map(&:name).join(', ')
73
73
  end
74
+
75
+ def to_tree_s indent = 0
76
+ ([' ' * indent] * categories.size).zip(categories.map(&:to_tree_s)).map(&:join).join "\n"
77
+ end
74
78
 
75
79
  def to_s
76
80
  "#{self.class}(#{categories.join(', ')})"
@@ -204,6 +204,15 @@ WARNING
204
204
  def to_s
205
205
  "#{self.class}(#{identifier})"
206
206
  end
207
+
208
+ def to_tree_s indent = 0
209
+ s = <<-TREE
210
+ #{' ' * indent}#{self.class.name.gsub('Picky::','')}(#{name})
211
+ #{' ' * indent} #{exact.to_tree_s(4)}
212
+ #{' ' * indent} #{partial.to_tree_s(4)}
213
+ TREE
214
+ s.chomp
215
+ end
207
216
 
208
217
  end
209
218
 
@@ -57,7 +57,8 @@ module Picky
57
57
  #
58
58
  def retrieve
59
59
  format = key_format?
60
- prepared.retrieve { |id, token| add_tokenized_token id, token, :<<, format }
60
+ static = static?
61
+ prepared.retrieve { |id, token| add_tokenized_token id, token, :<<, format, static }
61
62
  end
62
63
 
63
64
  # Return the key format.
@@ -72,6 +73,10 @@ module Picky
72
73
  def key_format?
73
74
  key_format
74
75
  end
76
+
77
+ def static?
78
+ @index.static? # || @static
79
+ end
75
80
 
76
81
  # Where the data is taken from.
77
82
  #
@@ -88,14 +88,15 @@ module Picky
88
88
 
89
89
  #
90
90
  #
91
- def add_tokenized_token id, text, where = :unshift, format = true
91
+ def add_tokenized_token id, text, where = :unshift, format = true, static = false
92
92
  return unless text
93
93
 
94
94
  id = id.send key_format if format
95
95
  # text = text.to_sym if @symbols # SYMBOLS.
96
+ id.freeze
96
97
 
97
- exact.add id, text, where
98
- partial.add_partialized id, text, where
98
+ exact.add id, text, where, static
99
+ partial.add_partialized id, text, where, static
99
100
  rescue NoMethodError => e
100
101
  puts e.message
101
102
  raise %Q{The object id with text "#{text}" does not respond to method #{key_format}.}
data/lib/picky/index.rb CHANGED
@@ -126,6 +126,15 @@ module Picky
126
126
 
127
127
  instance_eval(&Proc.new) if block_given?
128
128
  end
129
+
130
+ # TODO Doc.
131
+ #
132
+ def static
133
+ @static = true
134
+ end
135
+ def static?
136
+ @static
137
+ end
129
138
 
130
139
  # API method.
131
140
  #
@@ -140,6 +149,30 @@ module Picky
140
149
  @backend ||= Backends::Memory.new
141
150
  end
142
151
  end
152
+
153
+ # The directory used by this index.
154
+ #
155
+ # Note: Used @directory ||=, but needs to be dynamic.
156
+ #
157
+ def directory
158
+ ::File.join(Picky.root, 'index', PICKY_ENVIRONMENT, name.to_s)
159
+ end
160
+
161
+ # Restrict categories to the given ones.
162
+ #
163
+ # Functionally equivalent as if indexes didn't
164
+ # have the categories at all.
165
+ #
166
+ # Note: Probably only makes sense when an index
167
+ # is used in multiple searches. If not, why even
168
+ # have the categories?
169
+ #
170
+ # TODO Redesign.
171
+ #
172
+ def only *qualifiers
173
+ raise "Sorry, Picky::Search#only has been removed in version."
174
+ # @qualifier_mapper.restrict_to *qualifiers
175
+ end
143
176
 
144
177
  # TODO Reinstate.
145
178
  #
@@ -158,19 +191,6 @@ module Picky
158
191
  # @ignored_categories.uniq!
159
192
  # end
160
193
 
161
- # SYMBOLS.
162
- #
163
- # # API method.
164
- # #
165
- # # Tells Picky to use Symbols internally.
166
- # #
167
- # def use_symbols
168
- # @symbols = true
169
- # end
170
- # def use_symbols?
171
- # @symbols
172
- # end
173
-
174
194
  # API method.
175
195
  #
176
196
  # Defines a searchable category on the index.
@@ -195,30 +215,6 @@ module Picky
195
215
 
196
216
  new_category
197
217
  end
198
-
199
- # Restrict categories to the given ones.
200
- #
201
- # Functionally equivalent as if indexes didn't
202
- # have the categories at all.
203
- #
204
- # Note: Probably only makes sense when an index
205
- # is used in multiple searches. If not, why even
206
- # have the categories?
207
- #
208
- # TODO Redesign.
209
- #
210
- def only *qualifiers
211
- raise "Sorry, Picky::Search#only has been removed in version."
212
- # @qualifier_mapper.restrict_to *qualifiers
213
- end
214
-
215
- # The directory used by this index.
216
- #
217
- # Note: Used @directory ||=, but needs to be dynamic.
218
- #
219
- def directory
220
- ::File.join(Picky.root, 'index', PICKY_ENVIRONMENT, name.to_s)
221
- end
222
218
 
223
219
  # Make this category range searchable with a fixed range. If you need other
224
220
  # ranges, define another category with a different range value.
@@ -384,6 +380,18 @@ INDEX
384
380
  ].compact
385
381
  "#{self.class}(#{s.join(', ')})"
386
382
  end
383
+
384
+ # Displays the structure as a tree.
385
+ #
386
+ def to_tree_s indent = 0
387
+ <<-TREE
388
+ #{' ' * indent}Index(#{name})
389
+ #{' ' * indent} source: #{source.to_s[0..40]}
390
+ #{' ' * indent} result identifier: "#{result_identifier}"
391
+ #{' ' * indent} categories:
392
+ #{' ' * indent}#{categories.to_tree_s(4)}
393
+ TREE
394
+ end
387
395
 
388
396
  end
389
397
 
@@ -15,18 +15,21 @@ module Picky
15
15
 
16
16
  attr_reader :count,
17
17
  :score,
18
- :combinations,
19
- :result_identifier
18
+ :combinations
20
19
 
21
- #
20
+ # An allocation is defined by:
21
+ # * An index where the allocation was found, e.g. documents.
22
+ # * A number of combinations, e.g. 1. author:eloy, 2. name:bla.
22
23
  #
23
24
  def initialize index, combinations
25
+ @index = index
24
26
  @combinations = combinations
25
-
26
- # THINK Could this be rewritten?
27
- #
28
- @result_identifier = index.result_identifier
29
- @backend = index.backend
27
+ end
28
+
29
+ #
30
+ #
31
+ def backend
32
+ @index.backend
30
33
  end
31
34
 
32
35
  # Asks the backend for the total score and
@@ -37,12 +40,12 @@ module Picky
37
40
  # ignored (ie. removed).
38
41
  #
39
42
  def calculate_score boosts
40
- @score ||= if @combinations.empty?
43
+ @score ||= (if @combinations.empty?
41
44
  0 # Optimization.
42
45
  else
43
46
  # Note: Was @backend.score(@combinations) - indirection for maximum flexibility.
44
47
  @combinations.score + boosts.boost_for(@combinations)
45
- end
48
+ end)
46
49
  end
47
50
 
48
51
  # Asks the backend for the (intersected) ids.
@@ -53,7 +56,10 @@ module Picky
53
56
  #
54
57
  def calculate_ids amount, offset
55
58
  return [] if @combinations.empty? # Checked here to avoid checking in each backend.
56
- @backend.ids @combinations, amount, offset
59
+
60
+ # TODO Redesign such that ids is only created (and cached) if requested.
61
+ #
62
+ backend.ids @combinations, amount, offset
57
63
  end
58
64
 
59
65
  # Ids return by default [].
@@ -104,7 +110,7 @@ module Picky
104
110
  # Transform the allocation into result form.
105
111
  #
106
112
  def to_result
107
- [self.result_identifier, self.score, self.count, @combinations.to_result, self.ids] if self.count && self.count > 0
113
+ [@index.result_identifier, self.score, self.count, @combinations.to_result, self.ids] if self.count && self.count > 0
108
114
  end
109
115
 
110
116
  #
data/lib/picky/results.rb CHANGED
@@ -24,6 +24,8 @@ module Picky
24
24
 
25
25
  # Create new results and calculate the ids.
26
26
  #
27
+ # TODO Remove and calculate lazily via results.ids (rewrite all references to use Result.new).
28
+ #
27
29
  def self.from query, amount, offset, allocations, extra_allocations = nil, unique = false
28
30
  results = new query, amount, offset, allocations
29
31
  results.prepare! extra_allocations, unique
@@ -24,6 +24,8 @@ module Picky
24
24
  :raise_unless_similarity_exists,
25
25
 
26
26
  :similar,
27
+
28
+ :to_tree_s,
27
29
 
28
30
  :to => :bundle
29
31
 
@@ -19,6 +19,10 @@ module Picky
19
19
  def empty; end
20
20
  def index; end
21
21
  def load; end
22
+
23
+ def to_tree_s indent = 0
24
+ bundle.to_tree_s(indent) { "(reference)" }
25
+ end
22
26
 
23
27
  end
24
28
 
@@ -0,0 +1,43 @@
1
+ # encoding: utf-8
2
+ #
3
+ require 'spec_helper'
4
+ require 'ostruct'
5
+
6
+ describe "static option" do
7
+
8
+ it 'does not use the realtime index' do
9
+ thing = OpenStruct.new id: 1, text: "ohai"
10
+ other = OpenStruct.new id: 2, text: "ohai kthxbye"
11
+
12
+ static_index = Picky::Index.new :static do
13
+ static
14
+
15
+ key_format :to_i
16
+ source { [thing, other] } # Only really makes sense with a source.
17
+ category :text
18
+ end
19
+ static_index.index
20
+
21
+ static_index[:text].exact.realtime.should == {}
22
+
23
+ try = Picky::Search.new static_index
24
+ try.search("text:ohai").ids.should == [1, 2]
25
+ end
26
+
27
+ it 'still adds to the realtime index' do
28
+ index = Picky::Index.new :static do
29
+ static
30
+
31
+ key_format :to_i
32
+ category :text
33
+ end
34
+ index.add OpenStruct.new id: 1, text: "ohai"
35
+ index.add OpenStruct.new id: 2, text: "ohai kthxbye"
36
+
37
+ index[:text].exact.realtime.should == { 1 => ["ohai"], 2 => ["ohai", "kthxbye"] }
38
+
39
+ try = Picky::Search.new index
40
+ try.search("text:ohai").ids.should == [2, 1]
41
+ end
42
+
43
+ end
@@ -59,11 +59,11 @@ describe Picky::Category do
59
59
  .and_yield(5, :some_token)
60
60
  category.stub :prepared => prepared
61
61
 
62
- category.should_receive(:add_tokenized_token).once.with(1, :some_token, :<<, nil)
63
- category.should_receive(:add_tokenized_token).once.with(2, :some_token, :<<, nil)
64
- category.should_receive(:add_tokenized_token).once.with(3, :some_token, :<<, nil)
65
- category.should_receive(:add_tokenized_token).once.with(4, :some_token, :<<, nil)
66
- category.should_receive(:add_tokenized_token).once.with(5, :some_token, :<<, nil)
62
+ category.should_receive(:add_tokenized_token).once.with(1, :some_token, :<<, nil, nil)
63
+ category.should_receive(:add_tokenized_token).once.with(2, :some_token, :<<, nil, nil)
64
+ category.should_receive(:add_tokenized_token).once.with(3, :some_token, :<<, nil, nil)
65
+ category.should_receive(:add_tokenized_token).once.with(4, :some_token, :<<, nil, nil)
66
+ category.should_receive(:add_tokenized_token).once.with(5, :some_token, :<<, nil, nil)
67
67
 
68
68
  category.retrieve
69
69
  end
@@ -121,6 +121,55 @@ some_index_name (Picky::Index):
121
121
  source: some_source
122
122
  categories: text1, text2
123
123
  result identifier: "foobar"
124
+ EXPECTED
125
+ end
126
+ end
127
+
128
+ describe '#to_tree_s' do
129
+ let(:index) do
130
+ the_source = some_source
131
+ idx = described_class.new :some_index_name do
132
+ source { [1,2,3] }
133
+ category :text1
134
+ category :text2
135
+ result_identifier :foobar
136
+ end
137
+ idx.replace_from id: 1, text1: 'hello', text2: 'hoohoo'
138
+ idx
139
+ end
140
+
141
+ it 'outputs the stats correctly' do
142
+ index.to_tree_s.should == <<-EXPECTED
143
+ Index(some_index_name)
144
+ source: [1, 2, 3]
145
+ result identifier: "foobar"
146
+ categories:
147
+ Category(text1)
148
+ Bundle(exact)
149
+ Inverted(1)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text1_exact_inverted.memory.json)]
150
+ Weights (1)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text1_exact_weights.memory.json)]
151
+ Similari(0)[Picky::Backends::Memory::Marshal(spec/temp/index/test/some_index_name/text1_exact_similarity.memory.dump)]
152
+ Realtime(1)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text1_exact_realtime.memory.json)]
153
+ Configur(0)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text1_exact_configuration.memory.json)]
154
+ Bundle(partial)
155
+ Inverted(3)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text1_partial_inverted.memory.json)]
156
+ Weights (3)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text1_partial_weights.memory.json)]
157
+ Similari(0)[Picky::Backends::Memory::Marshal(spec/temp/index/test/some_index_name/text1_partial_similarity.memory.dump)]
158
+ Realtime(1)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text1_partial_realtime.memory.json)]
159
+ Configur(0)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text1_partial_configuration.memory.json)]
160
+ Category(text2)
161
+ Bundle(exact)
162
+ Inverted(1)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text2_exact_inverted.memory.json)]
163
+ Weights (1)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text2_exact_weights.memory.json)]
164
+ Similari(0)[Picky::Backends::Memory::Marshal(spec/temp/index/test/some_index_name/text2_exact_similarity.memory.dump)]
165
+ Realtime(1)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text2_exact_realtime.memory.json)]
166
+ Configur(0)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text2_exact_configuration.memory.json)]
167
+ Bundle(partial)
168
+ Inverted(3)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text2_partial_inverted.memory.json)]
169
+ Weights (3)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text2_partial_weights.memory.json)]
170
+ Similari(0)[Picky::Backends::Memory::Marshal(spec/temp/index/test/some_index_name/text2_partial_similarity.memory.dump)]
171
+ Realtime(1)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text2_partial_realtime.memory.json)]
172
+ Configur(0)[Picky::Backends::Memory::JSON(spec/temp/index/test/some_index_name/text2_partial_configuration.memory.json)]
124
173
  EXPECTED
125
174
  end
126
175
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picky
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.19.7
4
+ version: 4.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-29 00:00:00.000000000 Z
11
+ date: 2014-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: multi_json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.3'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack_fast_escape
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2009.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2009.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: text
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.2'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.2'
69
69
  description: Fast Ruby semantic text search engine with comfortable single field interface.
@@ -75,34 +75,38 @@ extensions:
75
75
  extra_rdoc_files: []
76
76
  files:
77
77
  - aux/picky/cli.rb
78
+ - bin/picky
79
+ - ext/picky/extconf.rb
80
+ - ext/picky/picky.c
81
+ - lib/picky.rb
78
82
  - lib/picky/analytics.rb
79
83
  - lib/picky/analyzer.rb
80
84
  - lib/picky/api/search/boost.rb
81
85
  - lib/picky/api/tokenizer/character_substituter.rb
82
86
  - lib/picky/api/tokenizer/stemmer.rb
83
87
  - lib/picky/backends/backend.rb
88
+ - lib/picky/backends/file.rb
84
89
  - lib/picky/backends/file/basic.rb
85
90
  - lib/picky/backends/file/json.rb
86
- - lib/picky/backends/file.rb
87
91
  - lib/picky/backends/helpers/file.rb
92
+ - lib/picky/backends/memory.rb
88
93
  - lib/picky/backends/memory/basic.rb
89
94
  - lib/picky/backends/memory/json.rb
90
95
  - lib/picky/backends/memory/marshal.rb
91
- - lib/picky/backends/memory.rb
92
96
  - lib/picky/backends/prepared/text.rb
97
+ - lib/picky/backends/redis.rb
93
98
  - lib/picky/backends/redis/basic.rb
94
99
  - lib/picky/backends/redis/directly_manipulable.rb
95
100
  - lib/picky/backends/redis/float.rb
96
101
  - lib/picky/backends/redis/list.rb
97
102
  - lib/picky/backends/redis/string.rb
98
- - lib/picky/backends/redis.rb
103
+ - lib/picky/backends/sqlite.rb
99
104
  - lib/picky/backends/sqlite/array.rb
100
105
  - lib/picky/backends/sqlite/basic.rb
101
106
  - lib/picky/backends/sqlite/directly_manipulable.rb
102
107
  - lib/picky/backends/sqlite/integer_key_array.rb
103
108
  - lib/picky/backends/sqlite/string_key_array.rb
104
109
  - lib/picky/backends/sqlite/value.rb
105
- - lib/picky/backends/sqlite.rb
106
110
  - lib/picky/bundle.rb
107
111
  - lib/picky/bundle_indexed.rb
108
112
  - lib/picky/bundle_indexing.rb
@@ -113,8 +117,8 @@ files:
113
117
  - lib/picky/categories_indexed.rb
114
118
  - lib/picky/categories_indexing.rb
115
119
  - lib/picky/categories_realtime.rb
116
- - lib/picky/category/location.rb
117
120
  - lib/picky/category.rb
121
+ - lib/picky/category/location.rb
118
122
  - lib/picky/category_convenience.rb
119
123
  - lib/picky/category_indexed.rb
120
124
  - lib/picky/category_indexing.rb
@@ -131,13 +135,14 @@ files:
131
135
  - lib/picky/extensions/string.rb
132
136
  - lib/picky/extensions/symbol.rb
133
137
  - lib/picky/generators/aliases.rb
138
+ - lib/picky/generators/partial.rb
134
139
  - lib/picky/generators/partial/default.rb
135
140
  - lib/picky/generators/partial/infix.rb
136
141
  - lib/picky/generators/partial/none.rb
137
142
  - lib/picky/generators/partial/postfix.rb
138
143
  - lib/picky/generators/partial/strategy.rb
139
144
  - lib/picky/generators/partial/substring.rb
140
- - lib/picky/generators/partial.rb
145
+ - lib/picky/generators/similarity.rb
141
146
  - lib/picky/generators/similarity/default.rb
142
147
  - lib/picky/generators/similarity/double_metaphone.rb
143
148
  - lib/picky/generators/similarity/metaphone.rb
@@ -145,15 +150,14 @@ files:
145
150
  - lib/picky/generators/similarity/phonetic.rb
146
151
  - lib/picky/generators/similarity/soundex.rb
147
152
  - lib/picky/generators/similarity/strategy.rb
148
- - lib/picky/generators/similarity.rb
149
153
  - lib/picky/generators/strategy.rb
154
+ - lib/picky/generators/weights.rb
150
155
  - lib/picky/generators/weights/constant.rb
151
156
  - lib/picky/generators/weights/default.rb
152
157
  - lib/picky/generators/weights/dynamic.rb
153
158
  - lib/picky/generators/weights/logarithmic.rb
154
159
  - lib/picky/generators/weights/strategy.rb
155
160
  - lib/picky/generators/weights/stub.rb
156
- - lib/picky/generators/weights.rb
157
161
  - lib/picky/helpers/identification.rb
158
162
  - lib/picky/helpers/indexing.rb
159
163
  - lib/picky/helpers/measuring.rb
@@ -184,37 +188,34 @@ files:
184
188
  - lib/picky/query/allocation.rb
185
189
  - lib/picky/query/allocations.rb
186
190
  - lib/picky/query/boosts.rb
187
- - lib/picky/query/combination/or.rb
188
191
  - lib/picky/query/combination.rb
192
+ - lib/picky/query/combination/or.rb
189
193
  - lib/picky/query/combinations.rb
190
- - lib/picky/query/indexes/check.rb
191
194
  - lib/picky/query/indexes.rb
195
+ - lib/picky/query/indexes/check.rb
192
196
  - lib/picky/query/or.rb
193
197
  - lib/picky/query/token.rb
194
198
  - lib/picky/query/tokens.rb
195
199
  - lib/picky/rack/harakiri.rb
196
- - lib/picky/results/exact_first.rb
197
200
  - lib/picky/results.rb
201
+ - lib/picky/results/exact_first.rb
198
202
  - lib/picky/scheduler.rb
199
203
  - lib/picky/search.rb
200
204
  - lib/picky/search_facets.rb
201
- - lib/picky/sinatra/index_actions.rb
202
205
  - lib/picky/sinatra.rb
206
+ - lib/picky/sinatra/index_actions.rb
203
207
  - lib/picky/source.rb
204
208
  - lib/picky/splitter.rb
205
209
  - lib/picky/splitters/automatic.rb
206
210
  - lib/picky/statistics.rb
207
211
  - lib/picky/tasks.rb
208
- - lib/picky/tokenizer/regexp_wrapper.rb
209
212
  - lib/picky/tokenizer.rb
213
+ - lib/picky/tokenizer/regexp_wrapper.rb
210
214
  - lib/picky/wrappers/bundle/calculation.rb
211
215
  - lib/picky/wrappers/bundle/delegators.rb
212
216
  - lib/picky/wrappers/bundle/exact_partial.rb
213
217
  - lib/picky/wrappers/bundle/location.rb
214
218
  - lib/picky/wrappers/bundle/wrapper.rb
215
- - lib/picky.rb
216
- - lib/tasks/try.rb
217
- - lib/try_compile.rb
218
219
  - lib/tasks/application.rake
219
220
  - lib/tasks/framework.rake
220
221
  - lib/tasks/index.rake
@@ -222,7 +223,8 @@ files:
222
223
  - lib/tasks/statistics.rake
223
224
  - lib/tasks/todo.rake
224
225
  - lib/tasks/try.rake
225
- - ext/picky/picky.c
226
+ - lib/tasks/try.rb
227
+ - lib/try_compile.rb
226
228
  - spec/aux/picky/cli_spec.rb
227
229
  - spec/functional/allocations_uniq_by_definition_spec.rb
228
230
  - spec/functional/arrays_as_ids_spec.rb
@@ -260,6 +262,7 @@ files:
260
262
  - spec/functional/remap_qualifiers_spec.rb
261
263
  - spec/functional/sorting_spec.rb
262
264
  - spec/functional/speed_spec.rb
265
+ - spec/functional/static_spec.rb
263
266
  - spec/functional/stemming_spec.rb
264
267
  - spec/functional/terminate_early_spec.rb
265
268
  - spec/functional/to_s_spec.rb
@@ -373,8 +376,6 @@ files:
373
376
  - spec/lib/tasks/try_spec.rb
374
377
  - spec/lib/tokenizer_spec.rb
375
378
  - spec/performant_spec.rb
376
- - bin/picky
377
- - ext/picky/extconf.rb
378
379
  homepage: http://florianhanke.com/picky
379
380
  licenses:
380
381
  - MIT
@@ -386,17 +387,17 @@ require_paths:
386
387
  - lib
387
388
  required_ruby_version: !ruby/object:Gem::Requirement
388
389
  requirements:
389
- - - '>='
390
+ - - ">="
390
391
  - !ruby/object:Gem::Version
391
392
  version: '0'
392
393
  required_rubygems_version: !ruby/object:Gem::Requirement
393
394
  requirements:
394
- - - '>='
395
+ - - ">="
395
396
  - !ruby/object:Gem::Version
396
397
  version: '0'
397
398
  requirements: []
398
399
  rubyforge_project: http://rubyforge.org/projects/picky
399
- rubygems_version: 2.0.14
400
+ rubygems_version: 2.2.0
400
401
  signing_key:
401
402
  specification_version: 4
402
403
  summary: 'Picky: Semantic Search Engine. Clever Interface. Good Tools.'
@@ -438,6 +439,7 @@ test_files:
438
439
  - spec/functional/remap_qualifiers_spec.rb
439
440
  - spec/functional/sorting_spec.rb
440
441
  - spec/functional/speed_spec.rb
442
+ - spec/functional/static_spec.rb
441
443
  - spec/functional/stemming_spec.rb
442
444
  - spec/functional/terminate_early_spec.rb
443
445
  - spec/functional/to_s_spec.rb