picky 2.4.2 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -156,7 +156,6 @@ module Interfaces
|
|
156
156
|
end
|
157
157
|
def querying_splits_text_on
|
158
158
|
splits = Internals::Tokenizers::Query.default.instance_variable_get :@splits_text_on
|
159
|
-
puts splits
|
160
159
|
splits && splits.respond_to?(:source) ? splits.source : splits
|
161
160
|
end
|
162
161
|
def querying_splits_text_on= new_value
|
@@ -6,6 +6,8 @@ module Indexers
|
|
6
6
|
#
|
7
7
|
# The tokenizer is taken from each category if specified, from the index, if not.
|
8
8
|
#
|
9
|
+
# TODO Think about this one more. It should work on an index, but also a single category.
|
10
|
+
#
|
9
11
|
class Parallel < Base
|
10
12
|
|
11
13
|
delegate :categories, :source, :to => :@index
|
@@ -62,7 +62,12 @@ module Internals
|
|
62
62
|
# The indexer is lazily generated and cached.
|
63
63
|
#
|
64
64
|
def indexer
|
65
|
-
@indexer ||= Indexers::Serial.new
|
65
|
+
@indexer ||= source.respond_to?(:each) ? Indexers::Parallel.new(self) : Indexers::Serial.new(self)
|
66
|
+
end
|
67
|
+
# TODO This is a hack to get the parallel indexer working.
|
68
|
+
#
|
69
|
+
def categories
|
70
|
+
[self]
|
66
71
|
end
|
67
72
|
# Returns an appropriate tokenizer.
|
68
73
|
# If one isn't set on this category, will try the index,
|
@@ -98,6 +98,8 @@ Example:
|
|
98
98
|
# delegate to each category to index themselves.
|
99
99
|
#
|
100
100
|
def index!
|
101
|
+
# TODO Duplicated in category.rb def indexer.
|
102
|
+
#
|
101
103
|
if source.respond_to?(:each)
|
102
104
|
warn %Q{\n\033[1mWarning\033[m, source for index "#{name}" is empty: #{source} (responds true to empty?).\n} if source.respond_to?(:empty?) && source.empty?
|
103
105
|
index_parallel
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: picky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.4.
|
5
|
+
version: 2.4.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Florian Hanke
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-07-01 00:00:00 +10:00
|
14
14
|
default_executable: picky
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - "="
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 2.4.
|
35
|
+
version: 2.4.3
|
36
36
|
type: :development
|
37
37
|
version_requirements: *id002
|
38
38
|
description: Fast Ruby semantic text search engine with comfortable single field interface.
|