indexer101 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/indexer101.rb +9 -4
- metadata +26 -25
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71b93d7302d137cd83ccd852e8506e349cbe3fc52723eed291c55875597606a3
|
4
|
+
data.tar.gz: 03d8a4f0800dac1ee5d7d7923742d7122898671ea72c9913b46c1d30e356dd35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3f8d541e4386651382c21f3936cfaa400f94cdff79729a95bfe7c10949ef628b4e3eddb1b873aecd9e1fc6ec97417ffcc79ab4d8639cec7e5b41ab93ecf2b2f
|
7
|
+
data.tar.gz: 52df9975cfbb4c4b7c1520d6d7e5efa3acc716ee70b11a15762534dbbe8acd70eee858428bb7982d718101c4395df33eb94fb53012e4c76e3839698531a0263c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/indexer101.rb
CHANGED
@@ -130,9 +130,9 @@ class Indexer101
|
|
130
130
|
|
131
131
|
Thread.current[:v] = case File.extname(location)
|
132
132
|
when '.xml'
|
133
|
-
Dynarex.new location
|
133
|
+
Dynarex.new location, debug: @debug
|
134
134
|
when '.json'
|
135
|
-
DxLite.new location, debug:
|
135
|
+
DxLite.new location, debug: @debug
|
136
136
|
end
|
137
137
|
}
|
138
138
|
end
|
@@ -152,6 +152,11 @@ class Indexer101
|
|
152
152
|
|
153
153
|
id2 = id
|
154
154
|
|
155
|
+
if @debug then
|
156
|
+
puts 'dx: ' + dx.class.inspect
|
157
|
+
puts 'dx.all: ' + dx.all.inspect
|
158
|
+
end
|
159
|
+
|
155
160
|
@indexer.uri_index.merge! Hash[dx.all.reverse.map.with_index \
|
156
161
|
{|x,i| [id+i, [Time.parse(x.created), x.title, x.url]]}]
|
157
162
|
|
@@ -215,7 +220,7 @@ class Indexer101
|
|
215
220
|
|
216
221
|
# enter the exact keywords to search from the index
|
217
222
|
#
|
218
|
-
def search(*keywords)
|
223
|
+
def search(*keywords, minchars: 3)
|
219
224
|
|
220
225
|
t = Time.now
|
221
226
|
|
@@ -224,7 +229,7 @@ class Indexer101
|
|
224
229
|
a = []
|
225
230
|
a += @indexer.index[x.to_sym].reverse if @indexer.index.has_key? x.to_sym
|
226
231
|
|
227
|
-
if x.length
|
232
|
+
if x.length >= minchars then
|
228
233
|
a += @indexer.index.keys.grep(/^#{x}/i).flat_map\
|
229
234
|
{|y| @indexer.index[y].reverse}
|
230
235
|
a += @indexer.index.keys.grep(/#{x}/i).flat_map\
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: indexer101
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -11,31 +11,31 @@ cert_chain:
|
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjEwMjIyMDAwNzQ2WhcN
|
15
|
+
MjIwMjIyMDAwNzQ2WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGi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yC+qUzy6zP
|
30
|
+
HJGDGqqHDtiYpWlQ3/VAD4V+mAYj67CTj8gM2Y0OfjOIzKLf4jeLzcR0XjxCS9bH
|
31
|
+
g3cF/0FdJ5ydwo6r9QW/mE5yej6yuWBD9NFjWVbV/TAY3rWWDtw9g1WG31HjZVRB
|
32
|
+
lYndPAx0WIUBse5IRDGTiQ1JuMI5vBrxYJCb1Je506nR2rktACDRVSe/DTM4sxZn
|
33
|
+
oP3LBd1hPOAhNya8tD4FmUjQg4tvuWwIKh55XorZVEkzTWGgAJSnu7XTxtPcjxFA
|
34
|
+
U/3nmRr1BTYMN96T+3L81oqJTW5CxAAlsR97O7H8eZhwnNdG9HjgAk4PwiMLOhPb
|
35
|
+
Ely2/UitUG79uLcra+83gWVYzYiqBYC2d5HR4vCpTeecqYFXjWo9E3LMrvyB5Unk
|
36
|
+
zn10wjI+T1ysW7U6t+VJft8s
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2021-02-22 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: dynarex
|
@@ -103,7 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.7.10
|
107
108
|
signing_key:
|
108
109
|
specification_version: 4
|
109
110
|
summary: Experimental gem to search a list of words 1 character at a time. Intended
|
metadata.gz.sig
CHANGED
Binary file
|