picky 4.6.3 → 4.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/lib/performant.c +4 -4
  2. data/lib/picky/analyzer.rb +6 -3
  3. data/lib/picky/backends/backend.rb +40 -0
  4. data/lib/picky/backends/file/json.rb +4 -0
  5. data/lib/picky/backends/file.rb +1 -25
  6. data/lib/picky/backends/memory/json.rb +4 -0
  7. data/lib/picky/backends/memory.rb +1 -29
  8. data/lib/picky/backends/redis/directly_manipulable.rb +15 -7
  9. data/lib/picky/backends/redis.rb +91 -92
  10. data/lib/picky/backends/sqlite/basic.rb +6 -0
  11. data/lib/picky/bundle.rb +12 -10
  12. data/lib/picky/categories_indexing.rb +0 -13
  13. data/lib/picky/category.rb +24 -21
  14. data/lib/picky/category_indexing.rb +8 -22
  15. data/lib/picky/constants.rb +0 -1
  16. data/lib/picky/generators/aliases.rb +2 -0
  17. data/lib/picky/generators/partial.rb +27 -0
  18. data/lib/picky/generators/similarity.rb +27 -0
  19. data/lib/picky/generators/weights.rb +32 -0
  20. data/lib/picky/helpers/identification.rb +18 -0
  21. data/lib/picky/helpers/indexing.rb +16 -0
  22. data/lib/picky/index.rb +6 -0
  23. data/lib/picky/index_indexing.rb +9 -21
  24. data/lib/picky/indexes_indexing.rb +5 -14
  25. data/lib/picky/loader.rb +204 -199
  26. data/lib/picky/query/indexes.rb +12 -1
  27. data/lib/picky/search.rb +1 -0
  28. data/lib/picky/source.rb +23 -0
  29. data/lib/picky/tokenizer.rb +35 -13
  30. data/spec/functional/facets_spec.rb +1 -1
  31. data/spec/functional/remap_qualifiers_spec.rb +43 -0
  32. data/spec/functional/tokenizer_spec.rb +1 -1
  33. data/spec/lib/api/search/boost_spec.rb +1 -1
  34. data/spec/lib/category_spec.rb +1 -4
  35. data/spec/lib/generators/partial_spec.rb +58 -0
  36. data/spec/lib/generators/similarity_spec.rb +59 -0
  37. data/spec/lib/generators/weights_spec.rb +68 -0
  38. data/spec/lib/index_indexing_spec.rb +2 -4
  39. data/spec/lib/index_spec.rb +6 -0
  40. data/spec/lib/pool_spec.rb +39 -35
  41. data/spec/lib/sinatra_spec.rb +2 -2
  42. data/spec/lib/source_spec.rb +63 -0
  43. data/spec/lib/tokenizer_spec.rb +64 -2
  44. metadata +20 -20
  45. data/lib/picky/api/category/partial.rb +0 -26
  46. data/lib/picky/api/category/similarity.rb +0 -26
  47. data/lib/picky/api/category/weight.rb +0 -28
  48. data/lib/picky/api/source.rb +0 -35
  49. data/lib/picky/api/tokenizer.rb +0 -37
  50. data/lib/picky/deployment.rb +0 -211
  51. data/spec/lib/api/category/partial_spec.rb +0 -49
  52. data/spec/lib/api/category/similarity_spec.rb +0 -50
  53. data/spec/lib/api/category/weight_spec.rb +0 -55
  54. data/spec/lib/api/source_spec.rb +0 -68
  55. data/spec/lib/api/tokenizer_spec.rb +0 -42
@@ -0,0 +1,58 @@
1
+ require 'spec_helper'
2
+
3
+ describe Picky::Generators::Partial do
4
+ let(:partial) { described_class } # "class", actually a module.
5
+ context 'extract_partial' do
6
+ context 'with nil' do
7
+ it 'returns the default' do
8
+ partial.from(nil).should == Picky::Partial::Default
9
+ end
10
+ end
11
+ context 'with a partial object' do
12
+ let(:partializer) do
13
+ Class.new do
14
+ def each_partial text
15
+ 'tex'
16
+ end
17
+ end.new
18
+ end
19
+ it 'yields the partial' do
20
+ partial.from(partializer).each_partial('whatevs') do |text|
21
+ text.should == 'tex'
22
+ end
23
+ end
24
+ end
25
+ context 'invalid partial' do
26
+ it 'raises with a nice error message' do
27
+ expect {
28
+ partial.from Object.new
29
+ }.to raise_error(<<-ERROR)
30
+ partial options should be either
31
+ * for example a Partial::Substring.new(from: m, to: n), Partial::Postfix.new(from: n), Partial::Infix.new(min: m, max: n) etc.
32
+ or
33
+ * an object that responds to #each_partial(str_or_sym) and yields each partial
34
+ ERROR
35
+ end
36
+ it 'raises with a nice error message' do
37
+ expect {
38
+ partial.from Object.new, 'some_index'
39
+ }.to raise_error(<<-ERROR)
40
+ partial options for some_index should be either
41
+ * for example a Partial::Substring.new(from: m, to: n), Partial::Postfix.new(from: n), Partial::Infix.new(min: m, max: n) etc.
42
+ or
43
+ * an object that responds to #each_partial(str_or_sym) and yields each partial
44
+ ERROR
45
+ end
46
+ it 'raises with a nice error message' do
47
+ expect {
48
+ partial.from Object.new, 'some_index', 'some_category'
49
+ }.to raise_error(<<-ERROR)
50
+ partial options for some_index:some_category should be either
51
+ * for example a Partial::Substring.new(from: m, to: n), Partial::Postfix.new(from: n), Partial::Infix.new(min: m, max: n) etc.
52
+ or
53
+ * an object that responds to #each_partial(str_or_sym) and yields each partial
54
+ ERROR
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,59 @@
1
+ require 'spec_helper'
2
+
3
+ describe Picky::Generators::Similarity do
4
+ let(:similarity) { described_class } # "class", actually a module.
5
+ context 'encode' do
6
+ context 'with nil' do
7
+ it 'returns the default' do
8
+ similarity.from(nil).should == Picky::Similarity::Default
9
+ end
10
+ end
11
+ context 'with a similarity object' do
12
+ let(:similarizer) do
13
+ Class.new do
14
+ def encode text
15
+ :encoded
16
+ end
17
+ def prioritize ary, encoded
18
+
19
+ end
20
+ end.new
21
+ end
22
+ it 'returns the encoded string' do
23
+ similarity.from(similarizer).encode('whatevs').should == :encoded
24
+ end
25
+ end
26
+ context 'invalid weight' do
27
+ it 'raises with a nice error message' do
28
+ expect {
29
+ similarity.from Object.new
30
+ }.to raise_error(<<-ERROR)
31
+ similarity options should be either
32
+ * for example a Similarity::Phonetic.new(n), Similarity::Metaphone.new(n), Similarity::DoubleMetaphone.new(n) etc.
33
+ or
34
+ * an object that responds to #encode(text) => encoded_text and #prioritize(array_of_encoded, encoded)
35
+ ERROR
36
+ end
37
+ it 'raises with a nice error message' do
38
+ expect {
39
+ similarity.from Object.new, 'some_index'
40
+ }.to raise_error(<<-ERROR)
41
+ similarity options for some_index should be either
42
+ * for example a Similarity::Phonetic.new(n), Similarity::Metaphone.new(n), Similarity::DoubleMetaphone.new(n) etc.
43
+ or
44
+ * an object that responds to #encode(text) => encoded_text and #prioritize(array_of_encoded, encoded)
45
+ ERROR
46
+ end
47
+ it 'raises with a nice error message' do
48
+ expect {
49
+ similarity.from Object.new, 'some_index', 'some_category'
50
+ }.to raise_error(<<-ERROR)
51
+ similarity options for some_index:some_category should be either
52
+ * for example a Similarity::Phonetic.new(n), Similarity::Metaphone.new(n), Similarity::DoubleMetaphone.new(n) etc.
53
+ or
54
+ * an object that responds to #encode(text) => encoded_text and #prioritize(array_of_encoded, encoded)
55
+ ERROR
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,68 @@
1
+ require 'spec_helper'
2
+
3
+ describe Picky::Generators::Weights do
4
+ let(:weights) { described_class } # "class", actually a module.
5
+ context 'self.from' do
6
+ context 'with nil' do
7
+ it 'returns the default' do
8
+ weights.from(nil).should == Picky::Weights::Default
9
+ end
10
+ end
11
+ context 'with a number' do
12
+ it 'returns a logarithmic weighter' do
13
+ weights.from(7.3).should be_kind_of(Picky::Weights::Logarithmic)
14
+ end
15
+ it 'returns a logarithmic weighter' do
16
+ weights.from(3.14).weight_for(10).should == 5.443 # ln(10) + 3.14 = 2.3025 + 3.14
17
+ end
18
+ end
19
+ context 'with a weight object' do
20
+ let(:weighter) do
21
+ Class.new do
22
+ def weight_for amount
23
+ 7.0
24
+ end
25
+ end.new
26
+ end
27
+ it 'creates a tokenizer' do
28
+ weights.from(weighter).weight_for(21).should == 7.0
29
+ end
30
+ end
31
+ context 'invalid weight' do
32
+ it 'raises with a nice error message' do
33
+ expect {
34
+ weights.from Object.new
35
+ }.to raise_error(<<-ERROR)
36
+ weight options should be either
37
+ * for example a Weights::Logarithmic.new, Weights::Constant.new(int = 0), Weights::Dynamic.new(&block) etc.
38
+ or
39
+ * an object that responds to #weight_for(amount_of_ids_for_token) => float
40
+ ERROR
41
+ end
42
+ end
43
+ context 'invalid weight' do
44
+ it 'raises with a nice error message' do
45
+ expect {
46
+ weights.from Object.new, 'some_index_name'
47
+ }.to raise_error(<<-ERROR)
48
+ weight options for some_index_name should be either
49
+ * for example a Weights::Logarithmic.new, Weights::Constant.new(int = 0), Weights::Dynamic.new(&block) etc.
50
+ or
51
+ * an object that responds to #weight_for(amount_of_ids_for_token) => float
52
+ ERROR
53
+ end
54
+ end
55
+ context 'invalid weight' do
56
+ it 'raises with a nice error message' do
57
+ expect {
58
+ weights.from Object.new, 'some_index_name', 'some_category_name'
59
+ }.to raise_error(<<-ERROR)
60
+ weight options for some_index_name:some_category_name should be either
61
+ * for example a Weights::Logarithmic.new, Weights::Constant.new(int = 0), Weights::Dynamic.new(&block) etc.
62
+ or
63
+ * an object that responds to #weight_for(amount_of_ids_for_token) => float
64
+ ERROR
65
+ end
66
+ end
67
+ end
68
+ end
@@ -68,16 +68,14 @@ describe Picky::Index do
68
68
  end
69
69
  end
70
70
  context 'with non#each source' do
71
- let(:source) { stub :source, :harvest => nil }
72
-
73
71
  it 'raises' do
74
- the_source = source
72
+ the_source = stub :source, :harvest => nil
75
73
  expect {
76
74
  described_class.new :some_name do
77
75
  source the_source
78
76
  end
79
77
  }.to raise_error(<<-ERROR)
80
- The some_name source should respond to either the method #each or
78
+ The source for some_name should respond to either the method #each or
81
79
  it can be a lambda/block, returning such a source.
82
80
  ERROR
83
81
  end
@@ -55,6 +55,12 @@ describe Picky::Index do
55
55
  source the_source
56
56
  end
57
57
  end
58
+
59
+ describe 'directory' do
60
+ it 'is correct' do
61
+ api.directory.should == 'spec/test_directory/index/test/some_index_name'
62
+ end
63
+ end
58
64
 
59
65
  describe 'geo_categories' do
60
66
  it 'delegates correctly' do
@@ -4,72 +4,76 @@ require 'spec_helper'
4
4
 
5
5
  describe Picky::Pool do
6
6
 
7
- class PoolTest
8
- extend Picky::Pool
7
+ let(:pool) do
8
+ Class.new do
9
+ extend Picky::Pool
9
10
 
10
- attr_reader :number
11
+ attr_reader :number
11
12
 
12
- def initialize number
13
- @number = number
13
+ def initialize number
14
+ @number = number
15
+ end
14
16
  end
15
17
  end
16
- class OtherPoolTest
17
- extend Picky::Pool
18
+ let(:other) do
19
+ Class.new do
20
+ extend Picky::Pool
18
21
 
19
- attr_reader :number
22
+ attr_reader :number
20
23
 
21
- def initialize number
22
- @number = number
24
+ def initialize number
25
+ @number = number
26
+ end
23
27
  end
24
28
  end
25
29
 
26
30
  context 'functional' do
27
31
  before(:each) do
28
32
  described_class.clear
29
- PoolTest.clear
30
- OtherPoolTest.clear
33
+ pool.clear
34
+ other.clear
31
35
  end
32
36
  it 'lets me get an instance' do
33
- PoolTest.new(1).should be_kind_of(PoolTest)
37
+ pool.new(1).should be_kind_of(pool)
34
38
  end
35
39
  it 'does not create a new reference if it has free ones' do
36
- pt1 = PoolTest.new 1
37
- pt2 = PoolTest.new 2
38
- pt1.release
40
+ p1 = pool.new 1
41
+ p2 = pool.new 2
42
+ p1.release
39
43
 
40
- PoolTest.free_size.should == 1
44
+ pool.free_size.should == 1
41
45
  end
42
46
  it 'gives me the released reference if I try to new' do
43
- pt1 = PoolTest.new 1
44
- pt2 = PoolTest.new 2
45
- pt1.release
47
+ p1 = pool.new 1
48
+ p2 = pool.new 2
49
+ p1.release
46
50
 
47
- PoolTest.new(3).number.should == 3
51
+ pool.new(3).number.should == 3
48
52
  end
49
53
  it 'releases all PoolTests if called on PoolTest' do
50
- pt1 = PoolTest.new 1
51
- PoolTest.new 2
52
- OtherPoolTest.new 1
53
- OtherPoolTest.new 2
54
+ p1 = pool.new 1
55
+ pool.new 2
56
+ other.new 1
57
+ other.new 2
54
58
 
55
- OtherPoolTest.free_size.should == 0
59
+ other.free_size.should == 0
56
60
 
57
- PoolTest.release_all
61
+ pool.release_all
58
62
 
59
- PoolTest.new(3).should == pt1
60
- OtherPoolTest.free_size.should == 0
63
+ pool.new(3).should == p1
64
+ other.free_size.should == 0
61
65
  end
62
66
  it 'releases all if called on Pool' do
63
- PoolTest.new 1
64
- PoolTest.new 2
65
- OtherPoolTest.new 1
66
- OtherPoolTest.new 2
67
+ pool.new 1
68
+ pool.new 2
69
+ other.new 1
70
+ other.new 2
67
71
 
68
- PoolTest.free_size.should == 0
72
+ pool.free_size.should == 0
69
73
 
70
74
  described_class.release_all
71
75
 
72
- PoolTest.free_size.should == 2
76
+ pool.free_size.should == 2
73
77
  end
74
78
  end
75
79
 
@@ -16,10 +16,10 @@ describe Picky::Sinatra do
16
16
  extendee.extend Picky::Sinatra
17
17
  end
18
18
  it 'has Picky specific methods' do
19
- extendee.send :indexing, some: 'option'
19
+ extendee.send :indexing, splits_text_on: /something/
20
20
  end
21
21
  it 'has Picky specific methods' do
22
- extendee.send :searching, some: 'option'
22
+ extendee.send :searching, splits_text_on: /something/
23
23
  end
24
24
  it 'gets delegated correctly' do
25
25
  Picky::Tokenizer.should_receive(:default_indexing_with).once.with some: 'option'
@@ -0,0 +1,63 @@
1
+ require 'spec_helper'
2
+
3
+ describe Picky::Source do
4
+ context 'unblock_source' do
5
+ context 'with block' do
6
+ it 'unblocks' do
7
+ result = described_class.from ->() { :some_source }, false
8
+
9
+ result.call == :some_source
10
+ end
11
+ end
12
+ context 'with #each' do
13
+ it 'takes the source directly' do
14
+ described_class.from([:some_source], true) == :some_source
15
+ end
16
+ it 'takes the source directly' do
17
+ described_class.from([:some_source], false) == :some_source
18
+ end
19
+ end
20
+ end
21
+ context 'extract_source' do
22
+ context 'block with source hash' do
23
+ it 'extracts a source' do
24
+ described_class.from(->(){}, false).should be_kind_of(Proc)
25
+ end
26
+ end
27
+ context 'each source' do
28
+ let(:source) do
29
+ Class.new do
30
+ def each
31
+
32
+ end
33
+ end.new
34
+ end
35
+ it 'extracts a source' do
36
+ described_class.from(source, false).should == source
37
+ end
38
+ end
39
+ context 'invalid source with nil not ok' do
40
+ it 'raises with a nice error message' do
41
+ expect {
42
+ described_class.from Object.new, false
43
+ }.to raise_error(<<-ERROR)
44
+ The source should respond to either the method #each or
45
+ it can be a lambda/block, returning such a source.
46
+ ERROR
47
+ end
48
+ it 'raises with a nice error message' do
49
+ expect {
50
+ described_class.from Object.new, false, 'some_index'
51
+ }.to raise_error(<<-ERROR)
52
+ The source for some_index should respond to either the method #each or
53
+ it can be a lambda/block, returning such a source.
54
+ ERROR
55
+ end
56
+ end
57
+ context 'with nil ok' do
58
+ it 'simply returns nil back' do
59
+ described_class.from(nil, true).should == nil
60
+ end
61
+ end
62
+ end
63
+ end
@@ -4,6 +4,14 @@ require 'spec_helper'
4
4
 
5
5
  describe Picky::Tokenizer do
6
6
 
7
+ describe 'with wrong/incorrectly spelled option' do
8
+ it 'informs the user nicely' do
9
+ expect {
10
+ described_class.new rejetcs_token_if: :blank?.to_proc
11
+ }.to raise_error(%Q{The option "rejetcs_token_if" is not a valid option for a Picky tokenizer.\nPlease see https://github.com/floere/picky/wiki/Indexing-configuration for valid options.})
12
+ end
13
+ end
14
+
7
15
  context 'with special instance' do
8
16
  let (:tokenizer) { described_class.new rejects_token_if: lambda { |token| token.to_s.length < 2 || token == :hello }, case_sensitive: true }
9
17
  it 'rejects tokens with length < 2' do
@@ -19,7 +27,7 @@ Removes characters: -
19
27
  Stopwords: -
20
28
  Splits text on: /\\s/
21
29
  Normalizes words: -
22
- Rejects tokens? Yes, see line 8 in app/application.rb
30
+ Rejects tokens? Yes, see line 16 in app/application.rb
23
31
  Substitutes chars? -
24
32
  Case sensitive? Yes.
25
33
  EXPECTED
@@ -49,7 +57,7 @@ EXPECTED
49
57
  tokenizer.reject(['a', nil, '', 'b']).should == ['a', 'b']
50
58
  end
51
59
  it 'rejects tokens based on the given rejection criteria if set' do
52
- tokenizer.rejects_token_if &:nil?
60
+ tokenizer.rejects_token_if :nil?.to_proc
53
61
 
54
62
  tokenizer.reject(['a', nil, '', 'b']).should == ['a', '', 'b']
55
63
  end
@@ -222,5 +230,59 @@ ERROR
222
230
  end
223
231
  end
224
232
  end
233
+
234
+ context 'from' do
235
+ context 'options hash' do
236
+ it 'creates a tokenizer' do
237
+ described_class.from(splits_text_on: /\t/).
238
+ tokenize("hello\tworld").should == [['hello', 'world'], ['hello', 'world']]
239
+ end
240
+ end
241
+ context 'tokenizer' do
242
+ let(:tokenizer) do
243
+ Class.new do
244
+ def tokenize text
245
+ ['unmoved', 'by', 'your', 'texts']
246
+ end
247
+ end.new
248
+ end
249
+ it 'creates a tokenizer' do
250
+ described_class.from(tokenizer).
251
+ tokenize("hello\tworld").should == ['unmoved', 'by', 'your', 'texts']
252
+ end
253
+ end
254
+ context 'invalid tokenizer' do
255
+ it 'raises with a nice error message' do
256
+ expect {
257
+ described_class.from Object.new
258
+ }.to raise_error(<<-ERROR)
259
+ indexing options should be either
260
+ * a Hash
261
+ or
262
+ * an object that responds to #tokenize(text) => [[token1, token2, ...], [original1, original2, ...]]
263
+ ERROR
264
+ end
265
+ it 'raises with a nice error message' do
266
+ expect {
267
+ described_class.from Object.new, 'some_index'
268
+ }.to raise_error(<<-ERROR)
269
+ indexing options for some_index should be either
270
+ * a Hash
271
+ or
272
+ * an object that responds to #tokenize(text) => [[token1, token2, ...], [original1, original2, ...]]
273
+ ERROR
274
+ end
275
+ it 'raises with a nice error message' do
276
+ expect {
277
+ described_class.from Object.new, 'some_index', 'some_category'
278
+ }.to raise_error(<<-ERROR)
279
+ indexing options for some_index:some_category should be either
280
+ * a Hash
281
+ or
282
+ * an object that responds to #tokenize(text) => [[token1, token2, ...], [original1, original2, ...]]
283
+ ERROR
284
+ end
285
+ end
286
+ end
225
287
 
226
288
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picky
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.3
4
+ version: 4.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-12 00:00:00.000000000 Z
12
+ date: 2012-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 4.6.3
37
+ version: 4.6.4
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 4.6.3
45
+ version: 4.6.4
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: text
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -136,13 +136,8 @@ files:
136
136
  - lib/maybe_compile.rb
137
137
  - lib/picky/analytics.rb
138
138
  - lib/picky/analyzer.rb
139
- - lib/picky/api/category/partial.rb
140
- - lib/picky/api/category/similarity.rb
141
- - lib/picky/api/category/weight.rb
142
139
  - lib/picky/api/search/boost.rb
143
- - lib/picky/api/source.rb
144
140
  - lib/picky/api/tokenizer/character_substituter.rb
145
- - lib/picky/api/tokenizer.rb
146
141
  - lib/picky/backends/backend.rb
147
142
  - lib/picky/backends/file/basic.rb
148
143
  - lib/picky/backends/file/json.rb
@@ -186,7 +181,6 @@ files:
186
181
  - lib/picky/character_substituters/west_european.rb
187
182
  - lib/picky/console.rb
188
183
  - lib/picky/constants.rb
189
- - lib/picky/deployment.rb
190
184
  - lib/picky/extensions/array.rb
191
185
  - lib/picky/extensions/class.rb
192
186
  - lib/picky/extensions/hash.rb
@@ -201,6 +195,7 @@ files:
201
195
  - lib/picky/generators/partial/postfix.rb
202
196
  - lib/picky/generators/partial/strategy.rb
203
197
  - lib/picky/generators/partial/substring.rb
198
+ - lib/picky/generators/partial.rb
204
199
  - lib/picky/generators/similarity/default.rb
205
200
  - lib/picky/generators/similarity/double_metaphone.rb
206
201
  - lib/picky/generators/similarity/metaphone.rb
@@ -208,6 +203,7 @@ files:
208
203
  - lib/picky/generators/similarity/phonetic.rb
209
204
  - lib/picky/generators/similarity/soundex.rb
210
205
  - lib/picky/generators/similarity/strategy.rb
206
+ - lib/picky/generators/similarity.rb
211
207
  - lib/picky/generators/strategy.rb
212
208
  - lib/picky/generators/weights/constant.rb
213
209
  - lib/picky/generators/weights/default.rb
@@ -215,6 +211,8 @@ files:
215
211
  - lib/picky/generators/weights/logarithmic.rb
216
212
  - lib/picky/generators/weights/strategy.rb
217
213
  - lib/picky/generators/weights/stub.rb
214
+ - lib/picky/generators/weights.rb
215
+ - lib/picky/helpers/identification.rb
218
216
  - lib/picky/helpers/indexing.rb
219
217
  - lib/picky/helpers/measuring.rb
220
218
  - lib/picky/index.rb
@@ -259,6 +257,7 @@ files:
259
257
  - lib/picky/search_facets.rb
260
258
  - lib/picky/sinatra/index_actions.rb
261
259
  - lib/picky/sinatra.rb
260
+ - lib/picky/source.rb
262
261
  - lib/picky/statistics.rb
263
262
  - lib/picky/tasks.rb
264
263
  - lib/picky/tokenizer.rb
@@ -299,6 +298,7 @@ files:
299
298
  - spec/functional/only_spec.rb
300
299
  - spec/functional/realtime_spec.rb
301
300
  - spec/functional/regression_spec.rb
301
+ - spec/functional/remap_qualifiers_spec.rb
302
302
  - spec/functional/speed_spec.rb
303
303
  - spec/functional/terminate_early_spec.rb
304
304
  - spec/functional/tokenizer_spec.rb
@@ -306,13 +306,8 @@ files:
306
306
  - spec/integration/sinatra_index_actions_spec.rb
307
307
  - spec/lib/analytics_spec.rb
308
308
  - spec/lib/analyzer_spec.rb
309
- - spec/lib/api/category/partial_spec.rb
310
- - spec/lib/api/category/similarity_spec.rb
311
- - spec/lib/api/category/weight_spec.rb
312
309
  - spec/lib/api/search/boost_spec.rb
313
- - spec/lib/api/source_spec.rb
314
310
  - spec/lib/api/tokenizer/character_substituter_spec.rb
315
- - spec/lib/api/tokenizer_spec.rb
316
311
  - spec/lib/backends/backend_spec.rb
317
312
  - spec/lib/backends/file/basic_spec.rb
318
313
  - spec/lib/backends/file_spec.rb
@@ -357,14 +352,17 @@ files:
357
352
  - spec/lib/generators/partial/none_spec.rb
358
353
  - spec/lib/generators/partial/postfix_spec.rb
359
354
  - spec/lib/generators/partial/substring_spec.rb
355
+ - spec/lib/generators/partial_spec.rb
360
356
  - spec/lib/generators/similarity/double_metaphone_spec.rb
361
357
  - spec/lib/generators/similarity/metaphone_spec.rb
362
358
  - spec/lib/generators/similarity/none_spec.rb
363
359
  - spec/lib/generators/similarity/phonetic_spec.rb
364
360
  - spec/lib/generators/similarity/soundex_spec.rb
361
+ - spec/lib/generators/similarity_spec.rb
365
362
  - spec/lib/generators/weights/constant_spec.rb
366
363
  - spec/lib/generators/weights/dynamic_spec.rb
367
364
  - spec/lib/generators/weights/logarithmic_spec.rb
365
+ - spec/lib/generators/weights_spec.rb
368
366
  - spec/lib/helpers/measuring_spec.rb
369
367
  - spec/lib/index_indexed_spec.rb
370
368
  - spec/lib/index_indexing_spec.rb
@@ -405,6 +403,7 @@ files:
405
403
  - spec/lib/search_spec.rb
406
404
  - spec/lib/sinatra_spec.rb
407
405
  - spec/lib/solr/schema_generator_spec.rb
406
+ - spec/lib/source_spec.rb
408
407
  - spec/lib/statistics_spec.rb
409
408
  - spec/lib/tasks/try_spec.rb
410
409
  - spec/lib/tokenizer_spec.rb
@@ -456,6 +455,7 @@ test_files:
456
455
  - spec/functional/only_spec.rb
457
456
  - spec/functional/realtime_spec.rb
458
457
  - spec/functional/regression_spec.rb
458
+ - spec/functional/remap_qualifiers_spec.rb
459
459
  - spec/functional/speed_spec.rb
460
460
  - spec/functional/terminate_early_spec.rb
461
461
  - spec/functional/tokenizer_spec.rb
@@ -463,13 +463,8 @@ test_files:
463
463
  - spec/integration/sinatra_index_actions_spec.rb
464
464
  - spec/lib/analytics_spec.rb
465
465
  - spec/lib/analyzer_spec.rb
466
- - spec/lib/api/category/partial_spec.rb
467
- - spec/lib/api/category/similarity_spec.rb
468
- - spec/lib/api/category/weight_spec.rb
469
466
  - spec/lib/api/search/boost_spec.rb
470
- - spec/lib/api/source_spec.rb
471
467
  - spec/lib/api/tokenizer/character_substituter_spec.rb
472
- - spec/lib/api/tokenizer_spec.rb
473
468
  - spec/lib/backends/backend_spec.rb
474
469
  - spec/lib/backends/file/basic_spec.rb
475
470
  - spec/lib/backends/file_spec.rb
@@ -514,14 +509,17 @@ test_files:
514
509
  - spec/lib/generators/partial/none_spec.rb
515
510
  - spec/lib/generators/partial/postfix_spec.rb
516
511
  - spec/lib/generators/partial/substring_spec.rb
512
+ - spec/lib/generators/partial_spec.rb
517
513
  - spec/lib/generators/similarity/double_metaphone_spec.rb
518
514
  - spec/lib/generators/similarity/metaphone_spec.rb
519
515
  - spec/lib/generators/similarity/none_spec.rb
520
516
  - spec/lib/generators/similarity/phonetic_spec.rb
521
517
  - spec/lib/generators/similarity/soundex_spec.rb
518
+ - spec/lib/generators/similarity_spec.rb
522
519
  - spec/lib/generators/weights/constant_spec.rb
523
520
  - spec/lib/generators/weights/dynamic_spec.rb
524
521
  - spec/lib/generators/weights/logarithmic_spec.rb
522
+ - spec/lib/generators/weights_spec.rb
525
523
  - spec/lib/helpers/measuring_spec.rb
526
524
  - spec/lib/index_indexed_spec.rb
527
525
  - spec/lib/index_indexing_spec.rb
@@ -562,6 +560,8 @@ test_files:
562
560
  - spec/lib/search_spec.rb
563
561
  - spec/lib/sinatra_spec.rb
564
562
  - spec/lib/solr/schema_generator_spec.rb
563
+ - spec/lib/source_spec.rb
565
564
  - spec/lib/statistics_spec.rb
566
565
  - spec/lib/tasks/try_spec.rb
567
566
  - spec/lib/tokenizer_spec.rb
567
+ has_rdoc: