redis-textsearch 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.rdoc +1 -0
  2. data/lib/redis/text_search.rb +1 -1
  3. metadata +19 -9
data/README.rdoc CHANGED
@@ -36,6 +36,7 @@ Model class:
36
36
 
37
37
  text_index :title, :minlength => 2
38
38
  text_index :tags, :exact => true
39
+ text_index :description, :full => true # allow full-phrase "Search With Spaces"
39
40
 
40
41
  # Using AR callback (you can call update_text_indexes anywhere on your instance)
41
42
  after_save do |r|
@@ -240,7 +240,7 @@ class Redis
240
240
  fields.each do |field|
241
241
  options = self.class.text_indexes[field]
242
242
  value = self.send(field).to_s
243
- return false if value.length < options[:minlength] # too short to index
243
+ next if value.length < options[:minlength] # too short to index
244
244
  indexes = []
245
245
 
246
246
  # If values is array, like :tags => ["a", "b"], use as-is
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-textsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 4
9
+ version: 0.1.4
5
10
  platform: ruby
6
11
  authors:
7
12
  - Nate Wiger
@@ -9,19 +14,22 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-03-05 00:00:00 -08:00
17
+ date: 2010-03-17 00:00:00 -07:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: redis
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 1
23
30
  version: "0.1"
24
- version:
31
+ type: :runtime
32
+ version_requirements: *id001
25
33
  description: Crazy fast text search using Redis. Works with any ORM or data store.
26
34
  email: nate@wiger.org
27
35
  executables: []
@@ -52,18 +60,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
52
60
  requirements:
53
61
  - - ">="
54
62
  - !ruby/object:Gem::Version
63
+ segments:
64
+ - 0
55
65
  version: "0"
56
- version:
57
66
  required_rubygems_version: !ruby/object:Gem::Requirement
58
67
  requirements:
59
68
  - - ">="
60
69
  - !ruby/object:Gem::Version
70
+ segments:
71
+ - 0
61
72
  version: "0"
62
- version:
63
73
  requirements:
64
74
  - redis, v0.1 or greater
65
75
  rubyforge_project: redis-textsearch
66
- rubygems_version: 1.3.5
76
+ rubygems_version: 1.3.6
67
77
  signing_key:
68
78
  specification_version: 3
69
79
  summary: Fast text search and word indexes using Redis