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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29ae0bede3bc885adc10e0c0f43bc38dfb43777e268dc09f9638d58759220493
4
- data.tar.gz: 5562a432fc730ffaf8eac5b698ab673e5225d5032b46e676241a599a93a98834
3
+ metadata.gz: 71b93d7302d137cd83ccd852e8506e349cbe3fc52723eed291c55875597606a3
4
+ data.tar.gz: 03d8a4f0800dac1ee5d7d7923742d7122898671ea72c9913b46c1d30e356dd35
5
5
  SHA512:
6
- metadata.gz: bebf0f9a41cb12c7828a52788b8bd2e33384036854e4d122a7bf1d44904c04654c725eab0ec994344bdfec7644be25cd8b1a20fee76e9757abc5875be8e84c61
7
- data.tar.gz: 667d7d1349885fda86add5ddbcf7dd57427617afc55e7fb2c610a18db00029471abff388e7a04b227d4b08343d63df1eac85f4a5298f08073a9a7f07cfad2931
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: false
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 > 3 then
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.3
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
- YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTkxMTExMjI1NjA5WhcN
15
- MjAxMTEwMjI1NjA5WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
- cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDEF92R
17
- JWEWjPhgU6nIiCKKXtWI9EE8DbqPtU+CnYuUN2BWN7c4dsbaYrU1tVMzxx22G+Of
18
- apTIeIGFrq/oqub6nhx+UbnkMAqpmbJS8zTgnwEhFsGHGI2CD9+4OXh5rl36SqqP
19
- IGxY7w45KDvuPWA/Htb2aC20cHclJebOj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Ucvb/iiMnE0PZdivLiorRjhdR5tIPAYhmuN7Mr5IscQFdb1cndyC+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: 2020-06-23 00:00:00.000000000 Z
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
- rubygems_version: 3.0.3
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