pg_search 2.1.2 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +11 -7
- data/.travis.yml +33 -42
- data/CHANGELOG.md +140 -112
- data/CONTRIBUTING.md +5 -3
- data/Gemfile +6 -4
- data/LICENSE +1 -1
- data/README.md +221 -159
- data/Rakefile +3 -5
- data/lib/pg_search/configuration/association.rb +2 -0
- data/lib/pg_search/configuration/column.rb +2 -0
- data/lib/pg_search/configuration/foreign_column.rb +2 -0
- data/lib/pg_search/configuration.rb +8 -4
- data/lib/pg_search/document.rb +5 -3
- data/lib/pg_search/features/dmetaphone.rb +3 -1
- data/lib/pg_search/features/feature.rb +4 -2
- data/lib/pg_search/features/trigram.rb +31 -5
- data/lib/pg_search/features/tsearch.rb +4 -1
- data/lib/pg_search/features.rb +2 -0
- data/lib/pg_search/migration/dmetaphone_generator.rb +3 -1
- data/lib/pg_search/migration/generator.rb +4 -2
- data/lib/pg_search/migration/multisearch_generator.rb +2 -1
- data/lib/pg_search/migration/templates/create_pg_search_documents.rb.erb +1 -1
- data/lib/pg_search/multisearch/rebuilder.rb +7 -3
- data/lib/pg_search/multisearch.rb +4 -4
- data/lib/pg_search/multisearchable.rb +10 -6
- data/lib/pg_search/normalizer.rb +2 -0
- data/lib/pg_search/railtie.rb +2 -0
- data/lib/pg_search/scope_options.rb +21 -41
- data/lib/pg_search/tasks.rb +3 -0
- data/lib/pg_search/version.rb +3 -1
- data/lib/pg_search.rb +10 -5
- data/pg_search.gemspec +8 -7
- data/spec/integration/associations_spec.rb +103 -101
- data/spec/integration/pagination_spec.rb +9 -7
- data/spec/integration/pg_search_spec.rb +266 -255
- data/spec/integration/single_table_inheritance_spec.rb +16 -15
- data/spec/lib/pg_search/configuration/association_spec.rb +7 -5
- data/spec/lib/pg_search/configuration/column_spec.rb +2 -0
- data/spec/lib/pg_search/configuration/foreign_column_spec.rb +5 -3
- data/spec/lib/pg_search/features/dmetaphone_spec.rb +6 -4
- data/spec/lib/pg_search/features/trigram_spec.rb +39 -12
- data/spec/lib/pg_search/features/tsearch_spec.rb +23 -21
- data/spec/lib/pg_search/multisearch/rebuilder_spec.rb +32 -11
- data/spec/lib/pg_search/multisearch_spec.rb +9 -7
- data/spec/lib/pg_search/multisearchable_spec.rb +68 -27
- data/spec/lib/pg_search/normalizer_spec.rb +7 -5
- data/spec/lib/pg_search_spec.rb +33 -31
- data/spec/spec_helper.rb +3 -1
- data/spec/support/database.rb +16 -20
- data/spec/support/with_model.rb +2 -0
- metadata +13 -30
- data/.rubocop_todo.yml +0 -163
- data/Guardfile +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 292701a98892eef31e95d8b5d723e94ce71fd47e4956e8bed595b8f87797f49c
|
4
|
+
data.tar.gz: cc08372ce5c032e288c28b2f6409c218d361b271fc271de08acbe8e5430c8dcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e95e7240968269703ae6d010639f2b4380e7616962c7a07f4932ad5e21c77affae6ea3c90e9a8171641a506988fa076ecdb30224f2b081d1468fb13618713d2e
|
7
|
+
data.tar.gz: 4910a636f53e444c3995e0ca728bd21475d11347d8a4d8223a1e881f3360bf8dc7e4f5689bd05cc559dad106a08b077abda1b3f50c6108221e4dbf75c4d73ffa
|
data/.rubocop.yml
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
|
1
|
+
require: rubocop-performance
|
2
2
|
|
3
3
|
AllCops:
|
4
|
+
TargetRubyVersion: 2.4
|
4
5
|
Exclude:
|
5
6
|
- bin/**/*
|
7
|
+
- vendor/**/*
|
6
8
|
|
7
9
|
Style/StringLiterals:
|
8
10
|
Enabled: false
|
@@ -20,9 +22,6 @@ Metrics/BlockLength:
|
|
20
22
|
Layout/AlignParameters:
|
21
23
|
EnforcedStyle: with_fixed_indentation
|
22
24
|
|
23
|
-
Style/HashSyntax:
|
24
|
-
Enabled: false
|
25
|
-
|
26
25
|
Style/NumericPredicate:
|
27
26
|
Enabled: false
|
28
27
|
|
@@ -45,8 +44,13 @@ Bundler/DuplicatedGem:
|
|
45
44
|
|
46
45
|
Style/EmptyMethod:
|
47
46
|
EnforcedStyle: expanded
|
47
|
+
|
48
|
+
Layout/IndentFirstArrayElement:
|
49
|
+
EnforcedStyle: consistent
|
48
50
|
|
49
|
-
|
50
|
-
# https://github.com/bbatsov/rubocop/pull/5230
|
51
|
-
Style/FormatStringToken:
|
51
|
+
Style/Documentation:
|
52
52
|
Enabled: false
|
53
|
+
|
54
|
+
Style/WordArray:
|
55
|
+
EnforcedStyle: percent
|
56
|
+
MinSize: 3
|
data/.travis.yml
CHANGED
@@ -1,59 +1,50 @@
|
|
1
1
|
language: ruby
|
2
2
|
sudo: false
|
3
|
+
bundler_args: --binstubs
|
4
|
+
cache: bundler
|
3
5
|
|
4
6
|
rvm:
|
5
|
-
-
|
6
|
-
-
|
7
|
-
-
|
8
|
-
-
|
9
|
-
- jruby-9.1.14.0
|
7
|
+
- 2.6.3
|
8
|
+
- 2.5.5
|
9
|
+
- 2.4.6
|
10
|
+
- jruby-9.2.6.0
|
10
11
|
|
11
12
|
env:
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
global:
|
14
|
+
- CC_TEST_REPORTER_ID=0a0e3e45118bc447e677d52c21d056a5471c4921d54f96ed7b2550d9fc5043ea
|
15
|
+
matrix:
|
16
|
+
- ACTIVE_RECORD_BRANCH="master"
|
17
|
+
- ACTIVE_RECORD_BRANCH="5-2-stable"
|
18
|
+
- ACTIVE_RECORD_VERSION="~> 6.0.0.beta1"
|
19
|
+
- ACTIVE_RECORD_VERSION="~> 5.2.0"
|
20
|
+
- ACTIVE_RECORD_VERSION="~> 5.1.0"
|
21
|
+
- ACTIVE_RECORD_VERSION="~> 5.0.0"
|
22
|
+
- ACTIVE_RECORD_VERSION="~> 4.2.9"
|
20
23
|
|
21
24
|
matrix:
|
22
25
|
allow_failures:
|
23
26
|
- env: ACTIVE_RECORD_BRANCH="master"
|
24
|
-
- env: ACTIVE_RECORD_BRANCH="5-
|
25
|
-
- env:
|
26
|
-
- env: ACTIVE_RECORD_BRANCH="4-2-stable"
|
27
|
-
- rvm: jruby-9.1.14.0
|
27
|
+
- env: ACTIVE_RECORD_BRANCH="5-2-stable"
|
28
|
+
- env: ACTIVE_RECORD_VERSION="~> 6.0.0.beta1"
|
28
29
|
exclude:
|
29
|
-
- rvm:
|
30
|
+
- rvm: 2.4.6
|
30
31
|
env: ACTIVE_RECORD_BRANCH="master"
|
31
|
-
- rvm:
|
32
|
-
env:
|
33
|
-
- rvm:
|
34
|
-
env:
|
35
|
-
- rvm: "2.1.10"
|
36
|
-
env: ACTIVE_RECORD_VERSION="~> 5.1.0"
|
37
|
-
- rvm: "2.1.10"
|
38
|
-
env: ACTIVE_RECORD_VERSION="~> 5.0.0"
|
39
|
-
- rvm: jruby-9.1.14.0
|
40
|
-
env: ACTIVE_RECORD_BRANCH="master"
|
41
|
-
- rvm: jruby-9.1.14.0
|
42
|
-
env: ACTIVE_RECORD_BRANCH="5-1-stable"
|
43
|
-
- rvm: jruby-9.1.14.0
|
44
|
-
env: ACTIVE_RECORD_BRANCH="5-0-stable"
|
45
|
-
- rvm: jruby-9.1.14.0
|
46
|
-
env: ACTIVE_RECORD_VERSION="~> 5.2.0.beta2"
|
47
|
-
- rvm: jruby-9.1.14.0
|
48
|
-
env: ACTIVE_RECORD_VERSION="~> 5.1.0"
|
49
|
-
- rvm: jruby-9.1.14.0
|
50
|
-
env: ACTIVE_RECORD_VERSION="~> 5.0.0"
|
32
|
+
- rvm: jruby-9.2.6.0
|
33
|
+
env: ACTIVE_RECORD_VERSION="~> 4.2.9"
|
34
|
+
- rvm: 2.4.5
|
35
|
+
env: ACTIVE_RECORD_VERSION="~> 6.0.0.beta1"
|
51
36
|
|
52
37
|
before_script:
|
53
|
-
-
|
38
|
+
- psql --version
|
39
|
+
- psql -c 'create database pg_search_test;' -U postgres >/dev/null
|
40
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
41
|
+
- chmod +x ./cc-test-reporter
|
42
|
+
- ./cc-test-reporter before-build
|
43
|
+
|
44
|
+
script: bin/rake
|
54
45
|
|
55
|
-
|
46
|
+
after_script:
|
47
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
56
48
|
|
57
49
|
addons:
|
58
|
-
|
59
|
-
repo_token: 0a0e3e45118bc447e677d52c21d056a5471c4921d54f96ed7b2550d9fc5043ea
|
50
|
+
postgresql: "9.6"
|
data/CHANGELOG.md
CHANGED
@@ -1,280 +1,308 @@
|
|
1
1
|
# pg_search changelog
|
2
2
|
|
3
|
+
## 2.2.0
|
4
|
+
|
5
|
+
* Add word_similarity option to trigram search (Severin Räz)
|
6
|
+
|
7
|
+
## 2.1.7
|
8
|
+
|
9
|
+
* Restore link to GitHub repository to original location
|
10
|
+
|
11
|
+
## 2.1.6
|
12
|
+
|
13
|
+
* Update link to GitHub repository to new location
|
14
|
+
|
15
|
+
## 2.1.5
|
16
|
+
|
17
|
+
* Drop support for Ruby < 2.4
|
18
|
+
|
19
|
+
## 2.1.4
|
20
|
+
|
21
|
+
* Drop support for Ruby < 2.3
|
22
|
+
* Use update instead of deprecated update_attributes
|
23
|
+
* Remove explicit arel dependency to better support Active Record 6 beta
|
24
|
+
|
25
|
+
## 2.1.3
|
26
|
+
|
27
|
+
* Drop support for Ruby < 2.2
|
28
|
+
* Disallow left/right single quotation marks in tsquery (Fabian Schwahn) (#382)
|
29
|
+
* Do not attempt to save an already-destroy PgSearch::Document (Oleg Dashevskii, Vokhmin Aleksei V) (#353)
|
30
|
+
* Quote column name when rebuilding (Jed Levin) (#379)
|
31
|
+
|
3
32
|
## 2.1.2
|
4
33
|
|
5
|
-
*
|
34
|
+
* Silence warnings in Rails 5.2.0.beta2 (Kevin Deisz)
|
6
35
|
|
7
36
|
## 2.1.1
|
8
37
|
|
9
|
-
*
|
38
|
+
* Support snake_case ts_headline options again (with deprecation warning)
|
10
39
|
|
11
40
|
## 2.1.0
|
12
41
|
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
42
|
+
* Allow ts_headline options to be passed to :highlight (Ian Heisters)
|
43
|
+
* Wait to load PgSearch::Document until after Active Record has loaded (Logan Leger)
|
44
|
+
* Add Rails version to generated migrations (Erik Eide)
|
16
45
|
|
17
46
|
## 2.0.1
|
18
47
|
|
19
|
-
*
|
48
|
+
* Remove require for generator that no longer exists. (Joshua Bartlett)
|
20
49
|
|
21
50
|
## 2.0.0
|
22
51
|
|
23
|
-
*
|
24
|
-
*
|
25
|
-
*
|
26
|
-
*
|
52
|
+
* Drop support for PostgreSQL < 9.2.
|
53
|
+
* Drop support for Active Record < 4.2.
|
54
|
+
* Drop support for Ruby < 2.1.
|
55
|
+
* Improve performance of has_one and belongs_to associations. (Peter Postma)
|
27
56
|
|
28
57
|
## 1.0.6
|
29
58
|
|
30
|
-
*
|
31
|
-
*
|
32
|
-
*
|
59
|
+
* Add support for highlighting the matching portion of a search result. (Jose Galisteo)
|
60
|
+
* Add `:update_if` option to control when PgSearch::Document gets updated. (Adam Becker)
|
61
|
+
* Add `:additional_attributes` option for adding additional attributes to PgSearch::Document
|
33
62
|
|
34
63
|
## 1.0.5
|
35
64
|
|
36
|
-
*
|
37
|
-
*
|
65
|
+
* Clean up rank table aliasing. (Adam Milligan)
|
66
|
+
* Fix issue when using `#with_pg_search_rank` across a join. (Reid Lynch)
|
38
67
|
|
39
68
|
## 1.0.4
|
40
69
|
|
41
|
-
*
|
42
|
-
*
|
70
|
+
* Assert valid options for features. (Janko Marohnić)
|
71
|
+
* Enable chaining of pg_search scopes. (Nicolas Buduroi)
|
43
72
|
|
44
73
|
## 1.0.3
|
45
74
|
|
46
|
-
*
|
75
|
+
* Support STI models using a custom inheritance column. (Nick Doiron)
|
47
76
|
|
48
77
|
## 1.0.2
|
49
78
|
|
50
|
-
*
|
79
|
+
* Don’t use SQL to rebuild search documents when models are multisearchable against dynamic methods and not just columns. Iterate over each record with `find_each` instead.
|
51
80
|
|
52
81
|
## 1.0.1
|
53
82
|
|
54
|
-
*
|
83
|
+
* Call `.unscoped` on relation used to build subquery, to eliminate unnecessary JOINs. (Markus Doits)
|
55
84
|
|
56
85
|
## 1.0.0
|
57
86
|
|
58
|
-
*
|
59
|
-
*
|
60
|
-
*
|
87
|
+
* Support more `ActiveRecord::Relation` methods, such as `#pluck` and `#select` by moving search-related operations to subquery.
|
88
|
+
* Generate index by default in migration for `pg_search_documents` table.
|
89
|
+
* Start officially using [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html).
|
61
90
|
|
62
91
|
## 0.7.9
|
63
92
|
|
64
|
-
*
|
93
|
+
* Improve support for single table inheritance (STI) models. (Ewan McDougall)
|
65
94
|
|
66
95
|
## 0.7.8
|
67
96
|
|
68
|
-
*
|
97
|
+
* Stop inadvertently including binstubs for guard and rspec.
|
69
98
|
|
70
99
|
## 0.7.7
|
71
100
|
|
72
|
-
*
|
101
|
+
* Fix future compatibility with Active Record 4.2.
|
73
102
|
|
74
103
|
## 0.7.6
|
75
104
|
|
76
|
-
*
|
77
|
-
*
|
105
|
+
* Fix migration generator in Rails 3. (Andrew Marshall and Nora Lin)
|
106
|
+
* Add `:only` option for limiting search fields per feature. (Jonathan Greenberg)
|
78
107
|
|
79
108
|
## 0.7.5
|
80
109
|
|
81
|
-
*
|
110
|
+
* Add option to make feature available only for sorting. (Brent Wheeldon)
|
82
111
|
|
83
112
|
## 0.7.4
|
84
113
|
|
85
|
-
*
|
86
|
-
*
|
114
|
+
* Fix which STI class name is used for searchable_type for PgSearch::Document. (Ewan McDougall)
|
115
|
+
* Add support for non-standard primary keys. (Matt Beedle)
|
87
116
|
|
88
117
|
## 0.7.3
|
89
118
|
|
90
|
-
*
|
119
|
+
* Allow simultaneously searching using `:associated_against` and `:tsvector_column` (Adam Becker)
|
91
120
|
|
92
121
|
## 0.7.2
|
93
122
|
|
94
|
-
*
|
123
|
+
* Add :threshold option for configuring how permissive trigram searches are.
|
95
124
|
|
96
125
|
## 0.7.1
|
97
126
|
|
98
|
-
*
|
99
|
-
|
127
|
+
* Fix issue with {:using => :trigram, :ignoring => :accents} that generated
|
128
|
+
bad SQL. (Steven Harman)
|
100
129
|
|
101
130
|
## 0.7.0
|
102
131
|
|
103
|
-
*
|
132
|
+
* Start requiring Ruby 1.9.2 or later.
|
104
133
|
|
105
134
|
## 0.6.4
|
106
135
|
|
107
|
-
*
|
136
|
+
* Fix issue with using more than two features in the same scope.
|
108
137
|
|
109
138
|
## 0.6.3
|
110
139
|
|
111
|
-
*
|
140
|
+
* Fix issues and deprecations for Active Record 4.0.0.rc1.
|
112
141
|
|
113
142
|
## 0.6.2
|
114
143
|
|
115
|
-
*
|
116
|
-
|
144
|
+
* Add workaround for issue with how ActiveRecord relations handle Arel OR
|
145
|
+
nodes.
|
117
146
|
|
118
147
|
## 0.6.1
|
119
148
|
|
120
|
-
*
|
121
|
-
|
149
|
+
* Fix issue with Arel::InfixOperation that prevented #count from working,
|
150
|
+
breaking pagination.
|
122
151
|
|
123
152
|
## 0.6.0
|
124
153
|
|
125
|
-
*
|
126
|
-
*
|
127
|
-
*
|
128
|
-
*
|
129
|
-
*
|
130
|
-
*
|
154
|
+
* Drop support for Active Record 3.0.
|
155
|
+
* Address warnings in Ruby 2.0.
|
156
|
+
* Remove all usages of sanitize_sql_array for future Rails 4 compatibility.
|
157
|
+
* Start using Arel internally to build SQL strings (not yet complete).
|
158
|
+
* Disable eager loading, fixes issue #14.
|
159
|
+
* Support named schemas in pg_search:multisearch:rebuild. (Victor Olteanu)
|
131
160
|
|
132
161
|
|
133
162
|
## 0.5.7
|
134
163
|
|
135
|
-
*
|
136
|
-
|
164
|
+
* Fix issue with eager loading now that the Scope class has been removed.
|
165
|
+
(Piotr Murach)
|
137
166
|
|
138
167
|
|
139
168
|
## 0.5.6
|
140
169
|
|
141
|
-
*
|
142
|
-
|
143
|
-
*
|
170
|
+
* PgSearch#multisearchable accepts :if and :unless for conditional inclusion
|
171
|
+
in search documents table. (Francois Harbec)
|
172
|
+
* Stop using array_to_string() in SQL since it is not indexable.
|
144
173
|
|
145
174
|
|
146
175
|
## 0.5.5
|
147
176
|
|
148
|
-
*
|
149
|
-
*
|
177
|
+
* Fix bug with single table inheritance.
|
178
|
+
* Allow option for specifying an alternate function for unaccent().
|
150
179
|
|
151
180
|
|
152
181
|
## 0.5.4
|
153
182
|
|
154
|
-
*
|
155
|
-
|
156
|
-
*
|
183
|
+
* Fix bug in associated_against join clause when search scope is chained
|
184
|
+
after other scopes.
|
185
|
+
* Fix autoloading of PgSearch::VERSION constant.
|
157
186
|
|
158
187
|
|
159
188
|
## 0.5.3
|
160
189
|
|
161
|
-
*
|
162
|
-
|
190
|
+
* Prevent multiple attempts to create pg_search_document within a single
|
191
|
+
transaction. (JT Archie & Trace Wax)
|
163
192
|
|
164
193
|
|
165
194
|
## 0.5.2
|
166
195
|
|
167
|
-
*
|
196
|
+
* Don't save twice if pg_search_document is missing on update.
|
168
197
|
|
169
198
|
|
170
199
|
## 0.5.1
|
171
200
|
|
172
|
-
*
|
201
|
+
* Add ability to override multisearch rebuild SQL.
|
173
202
|
|
174
203
|
|
175
204
|
## 0.5
|
176
205
|
|
177
|
-
*
|
178
|
-
*
|
179
|
-
|
180
|
-
*
|
206
|
+
* Convert migration rake tasks into generators.
|
207
|
+
* Use rake task arguments for multisearch rebuild instead of environment
|
208
|
+
variable.
|
209
|
+
* Always cast columns to text.
|
181
210
|
|
182
211
|
|
183
212
|
## 0.4.2
|
184
213
|
|
185
|
-
*
|
186
|
-
|
187
|
-
*
|
188
|
-
*
|
189
|
-
*
|
190
|
-
*
|
214
|
+
* Fill in timestamps correctly when rebuilding multisearch documents.
|
215
|
+
(Barton McGuire)
|
216
|
+
* Fix various issues with rebuilding multisearch documents. (Eugen Neagoe)
|
217
|
+
* Fix syntax error in pg_search_dmetaphone() migration. (Casey Foster)
|
218
|
+
* Rename PgSearch#rank to PgSearch#pg_search_rank and always return a Float.
|
219
|
+
* Fix issue with :associated_against and non-text columns.
|
191
220
|
|
192
221
|
|
193
222
|
## 0.4.1
|
194
223
|
|
195
|
-
*
|
224
|
+
* Fix Active Record 3.2 deprecation warnings. (Steven Harman)
|
196
225
|
|
197
|
-
*
|
198
|
-
|
226
|
+
* Fix issue with undefined logger when PgSearch::Document.search is already
|
227
|
+
defined.
|
199
228
|
|
200
229
|
|
201
230
|
## 0.4
|
202
231
|
|
203
|
-
*
|
232
|
+
* Add ability to search again tsvector columns. (Kris Hicks)
|
204
233
|
|
205
234
|
|
206
235
|
## 0.3.4
|
207
236
|
|
208
|
-
*
|
209
|
-
*
|
237
|
+
* Fix issue with {:using => {:tsearch => {:prefix => true}}} and hyphens.
|
238
|
+
* Get tests running against PostgreSQL 9.1 by using CREATE EXTENSION
|
210
239
|
|
211
240
|
|
212
241
|
## 0.3.3
|
213
242
|
|
214
|
-
*
|
215
|
-
|
216
|
-
*
|
217
|
-
|
218
|
-
*
|
219
|
-
|
243
|
+
* Backport array_agg() aggregate function to PostgreSQL 8.3 and earlier.
|
244
|
+
This fixes :associated_against searches.
|
245
|
+
* Backport unnest() function to PostgreSQL 8.3 and earlier. This fixes
|
246
|
+
{:using => :dmetaphone} searches.
|
247
|
+
* Disable {:using => {:tsearch => {:prefix => true}}} in PostgreSQL 8.3 and
|
248
|
+
earlier.
|
220
249
|
|
221
250
|
|
222
251
|
## 0.3.2
|
223
252
|
|
224
|
-
*
|
225
|
-
*
|
253
|
+
* Fix :prefix search in PostgreSQL 8.x
|
254
|
+
* Disable {:ignoring => :accents} in PostgreSQL 8.x
|
226
255
|
|
227
256
|
|
228
257
|
## 0.3.1
|
229
258
|
|
230
|
-
*
|
259
|
+
* Fix syntax error in generated dmetaphone migration. (Max De Marzi)
|
231
260
|
|
232
261
|
|
233
262
|
## 0.3
|
234
263
|
|
235
|
-
*
|
236
|
-
*
|
237
|
-
*
|
238
|
-
*
|
239
|
-
|
240
|
-
*
|
241
|
-
|
264
|
+
* Drop Active Record 2.0 support.
|
265
|
+
* Add PgSearch.multisearch for cross-model searching.
|
266
|
+
* Fix PostgreSQL warnings about truncated identifiers
|
267
|
+
* Support specifying a method of rank normalisation when using tsearch.
|
268
|
+
(Arthur Gunn)
|
269
|
+
* Add :any_word option to :tsearch which uses OR between query terms instead
|
270
|
+
of AND. (Fernando Espinosa)
|
242
271
|
|
243
272
|
## 0.2.2
|
244
273
|
|
245
|
-
*
|
246
|
-
|
274
|
+
* Fix a compatibility issue between Ruby 1.8.7 and 1.9.3 when using Rails 2
|
275
|
+
(James Badger)
|
247
276
|
|
248
277
|
## 0.2.1
|
249
278
|
|
250
|
-
*
|
279
|
+
* Backport support for searching against tsvector columns (Kris Hicks)
|
251
280
|
|
252
281
|
## 0.2
|
253
282
|
|
254
|
-
*
|
255
|
-
|
256
|
-
|
257
|
-
*
|
258
|
-
*
|
259
|
-
|
283
|
+
* Set dictionary to :simple by default for :tsearch. Before it was unset,
|
284
|
+
which would fall back to PostgreSQL's default dictionary, usually
|
285
|
+
"english".
|
286
|
+
* Fix a bug with search strings containing a colon ":"
|
287
|
+
* Improve performance of :associated_against by only doing one INNER JOIN
|
288
|
+
per association
|
260
289
|
|
261
290
|
## 0.1.1
|
262
291
|
|
263
|
-
*
|
264
|
-
|
292
|
+
* Fix a bug with dmetaphone searches containing " w " (which dmetaphone maps
|
293
|
+
to an empty string)
|
265
294
|
|
266
295
|
## 0.1
|
267
296
|
|
268
|
-
*
|
269
|
-
*
|
270
|
-
*
|
271
|
-
|
297
|
+
* Change API to {:ignoring => :accents} from {:normalizing => :diacritics}
|
298
|
+
* Improve documentation
|
299
|
+
* Fix bug where :associated_against would not work without an :against
|
300
|
+
present
|
272
301
|
|
273
302
|
## 0.0.2
|
274
303
|
|
275
|
-
*
|
304
|
+
* Fix gem ownership.
|
276
305
|
|
277
|
-
#
|
278
306
|
## 0.0.1
|
279
307
|
|
280
|
-
*
|
308
|
+
* Initial release.
|
data/CONTRIBUTING.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
First off, if you experience a bug, we welcome you to report it. Please provide a minimal test case showing the code that you ran, its output, and what you expected the output to be instead. If you are able to fix the bug and make a pull request, we are much more likely to get it resolved quickly, but don't feel bad to just report an issue if you don't know how to fix it.
|
4
4
|
|
5
|
-
|
5
|
+
View the [README](./README.md) to see which versions of Ruby, Active Record, and PostgreSQL are supported by pg_search. It can be hard to test against all of the various versions, but please do your best to avoid coding practices that only work in newer versions.
|
6
6
|
|
7
7
|
If you have a substantial feature to add, you might want to discuss it first on the [mailing list](https://groups.google.com/forum/#!forum/casecommons-dev). We might have thought hard about it already, and can sometimes help with tips and tricks.
|
8
8
|
|
@@ -10,8 +10,10 @@ When in doubt, go ahead and make a pull request. If something needs tweaking or
|
|
10
10
|
|
11
11
|
Don't be discouraged if the maintainers ask you to change your code. We are always appreciative when people work hard to modify our code, but we also have a lot of opinions about coding style and object design.
|
12
12
|
|
13
|
-
|
13
|
+
Our automated tests start by updating all gems to their latest version. This is by design, because we want to be proactive about compatibility with other libraries. You can do the same by running `bundle update` at any time. To test against a specific version of Active Record, you can set the `ACTIVE_RECORD_VERSION` environment variable.
|
14
14
|
|
15
|
-
$ ACTIVE_RECORD_VERSION=
|
15
|
+
$ ACTIVE_RECORD_VERSION=5.0 bundle update
|
16
|
+
|
17
|
+
Run the tests by running `bundle exec rake`, or `bin/rake` if you use Bundler binstubs.
|
16
18
|
|
17
19
|
Last, but not least, have fun! pg_search is a labor of love.
|
data/Gemfile
CHANGED
@@ -1,13 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
gemspec
|
4
6
|
|
5
|
-
gem 'pg', '>= 0.21.0',
|
6
|
-
gem "activerecord-jdbcpostgresql-adapter", ">= 1.3.1", :
|
7
|
+
gem 'pg', '>= 0.21.0', '< 1.0.0', platform: :ruby
|
8
|
+
gem "activerecord-jdbcpostgresql-adapter", ">= 1.3.1", platform: :jruby
|
7
9
|
|
8
10
|
if ENV['ACTIVE_RECORD_BRANCH']
|
9
|
-
gem 'activerecord', :
|
10
|
-
gem 'arel', :
|
11
|
+
gem 'activerecord', git: 'https://github.com/rails/rails.git', branch: ENV['ACTIVE_RECORD_BRANCH']
|
12
|
+
gem 'arel', git: 'https://github.com/rails/arel.git' if ENV['ACTIVE_RECORD_BRANCH'] == 'master'
|
11
13
|
end
|
12
14
|
|
13
15
|
gem 'activerecord', ENV['ACTIVE_RECORD_VERSION'] if ENV['ACTIVE_RECORD_VERSION']
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2010-
|
1
|
+
Copyright (c) 2010-2019 Casebook, PBC <http://www.casebook.net>
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
of this software and associated documentation files (the "Software"), to deal
|