pg_search 2.3.7 → 2.4.0
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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +38 -37
- data/.github/workflows/codeql.yml +86 -0
- data/.gitignore +0 -1
- data/.standard.yml +2 -2
- data/CHANGELOG.md +81 -64
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +4 -2
- data/LICENSE +1 -1
- data/README.md +89 -87
- data/Rakefile +1 -7
- data/doc/plans/2026-09-05-arel-stack.md +43 -0
- data/doc/plans/2026-09-06-arel-remaining-expressions.md +48 -0
- data/lib/pg_search/configuration/association.rb +37 -23
- data/lib/pg_search/configuration/column.rb +17 -12
- data/lib/pg_search/configuration/foreign_column.rb +3 -5
- data/lib/pg_search/configuration.rb +10 -26
- data/lib/pg_search/features/dmetaphone.rb +3 -7
- data/lib/pg_search/features/feature.rb +8 -4
- data/lib/pg_search/features/trigram.rb +6 -20
- data/lib/pg_search/features/tsearch.rb +47 -61
- data/lib/pg_search/features.rb +2 -0
- data/lib/pg_search/migration/generator.rb +1 -5
- data/lib/pg_search/model.rb +6 -8
- data/lib/pg_search/multisearch/rebuilder.rb +69 -64
- data/lib/pg_search/normalizer.rb +40 -11
- data/lib/pg_search/scope_options.rb +32 -49
- data/lib/pg_search/version.rb +1 -1
- data/pg_search.gemspec +5 -5
- data/spec/integration/associations_spec.rb +133 -0
- data/spec/integration/deprecation_spec.rb +5 -1
- data/spec/integration/pagination_spec.rb +1 -0
- data/spec/integration/pg_search_spec.rb +78 -1
- data/spec/integration/single_table_inheritance_spec.rb +2 -0
- data/spec/lib/pg_search/configuration/association_spec.rb +34 -58
- data/spec/lib/pg_search/configuration/column_spec.rb +73 -15
- data/spec/lib/pg_search/configuration/foreign_column_spec.rb +53 -20
- data/spec/lib/pg_search/features/dmetaphone_spec.rb +2 -2
- data/spec/lib/pg_search/features/trigram_spec.rb +8 -9
- data/spec/lib/pg_search/features/tsearch_spec.rb +8 -8
- data/spec/lib/pg_search/multisearch/rebuilder_spec.rb +251 -211
- data/spec/lib/pg_search/multisearch_spec.rb +16 -16
- data/spec/lib/pg_search/multisearchable_spec.rb +8 -0
- data/spec/lib/pg_search/normalizer_spec.rb +64 -11
- data/spec/lib/pg_search_spec.rb +6 -21
- data/spec/spec_helper.rb +0 -13
- metadata +11 -15
- data/spec/.rubocop.yml +0 -27
- data/spec/integration/.rubocop.yml +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d337f465568b2cbd9bd1339db2800ebd9f8e36440c826128de97047221ff696a
|
|
4
|
+
data.tar.gz: 925270bc694ea367614dbf45988b88bd1e8fd33d8c9bee48e0a8cc286866a584
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 652c592fe592367e820d0608f0e8d8108d8d4b734e09690d732d224414919b4f8aba80b54e100bc0d4c7e9c265c907ad7c425a4118070163981e2180bcf83723
|
|
7
|
+
data.tar.gz: c52bb869600f87bbecaa584eef713a3b34d55668d6e632277730209fc65999361a4d4d8f4e831ff4bfbb1d9d9d0a6f03127f6b5469ae7bca524b6d68d9e133f2
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -6,15 +6,22 @@ on:
|
|
|
6
6
|
- master
|
|
7
7
|
- github-actions
|
|
8
8
|
pull_request:
|
|
9
|
-
branches:
|
|
10
|
-
- master
|
|
11
9
|
schedule:
|
|
12
10
|
- cron: "0 18 * * 6" # Saturdays at 12pm CST
|
|
13
11
|
workflow_dispatch:
|
|
14
12
|
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
19
|
+
|
|
15
20
|
jobs:
|
|
16
21
|
test:
|
|
22
|
+
name: Ruby ${{ matrix.ruby-version }} / Active Record ${{ matrix.active-record.label }}
|
|
17
23
|
runs-on: ubuntu-latest
|
|
24
|
+
timeout-minutes: 20
|
|
18
25
|
services:
|
|
19
26
|
postgres:
|
|
20
27
|
image: postgres:latest
|
|
@@ -32,49 +39,43 @@ jobs:
|
|
|
32
39
|
CI: true
|
|
33
40
|
PGHOST: 127.0.0.1
|
|
34
41
|
PGUSER: postgres
|
|
35
|
-
PGPASS: postgres
|
|
36
42
|
strategy:
|
|
37
43
|
fail-fast: false
|
|
38
44
|
matrix:
|
|
39
|
-
ruby-version: [
|
|
40
|
-
active-record
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
- ACTIVE_RECORD_VERSION="~> 7.1.0"
|
|
44
|
-
- ACTIVE_RECORD_VERSION="~> 7.2.0"
|
|
45
|
+
ruby-version: ["3.3", "3.4", "4.0"]
|
|
46
|
+
active-record:
|
|
47
|
+
- { label: "8.0", env: "ACTIVE_RECORD_VERSION=~> 8.0.0" }
|
|
48
|
+
- { label: "8.1", env: "ACTIVE_RECORD_VERSION=~> 8.1.0" }
|
|
45
49
|
allow-failure: [false]
|
|
46
|
-
exclude:
|
|
47
|
-
- ruby-version: '3.0'
|
|
48
|
-
active-record-version-env: ACTIVE_RECORD_VERSION="~> 7.2.0"
|
|
49
50
|
include:
|
|
50
|
-
- ruby-version:
|
|
51
|
-
active-record
|
|
51
|
+
- ruby-version: "4.0"
|
|
52
|
+
active-record: { label: "main", env: "ACTIVE_RECORD_BRANCH=main" }
|
|
52
53
|
allow-failure: true
|
|
53
|
-
- ruby-version:
|
|
54
|
-
active-record-
|
|
54
|
+
- ruby-version: "4.0"
|
|
55
|
+
active-record: { label: "8-1-stable", env: "ACTIVE_RECORD_BRANCH=8-1-stable" }
|
|
55
56
|
allow-failure: true
|
|
56
|
-
- ruby-version:
|
|
57
|
-
active-record-
|
|
57
|
+
- ruby-version: "4.0"
|
|
58
|
+
active-record: { label: "8-0-stable", env: "ACTIVE_RECORD_BRANCH=8-0-stable" }
|
|
58
59
|
allow-failure: true
|
|
59
|
-
- ruby-version:
|
|
60
|
-
active-record
|
|
61
|
-
allow-failure: true
|
|
62
|
-
- ruby-version: '3.3'
|
|
63
|
-
active-record-version-env: ACTIVE_RECORD_BRANCH="6-1-stable"
|
|
60
|
+
- ruby-version: "ruby-head"
|
|
61
|
+
active-record: { label: "8.1", env: "ACTIVE_RECORD_VERSION=~> 8.1.0" }
|
|
64
62
|
allow-failure: true
|
|
65
63
|
continue-on-error: ${{ matrix.allow-failure }}
|
|
66
64
|
steps:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
- uses: actions/checkout@v6
|
|
66
|
+
- name: Select ActiveRecord version
|
|
67
|
+
env:
|
|
68
|
+
ACTIVE_RECORD_ENV: ${{ matrix.active-record.env }}
|
|
69
|
+
run: echo "$ACTIVE_RECORD_ENV" >> "$GITHUB_ENV"
|
|
70
|
+
- name: Set up Ruby
|
|
71
|
+
uses: ruby/setup-ruby@v1
|
|
72
|
+
with:
|
|
73
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
74
|
+
bundler-cache: true
|
|
75
|
+
cache-version: ${{ matrix.active-record.env }}
|
|
76
|
+
- name: Set up test database
|
|
77
|
+
env:
|
|
78
|
+
PGPASSWORD: postgres
|
|
79
|
+
run: createdb pg_search_test
|
|
80
|
+
- name: Run tests
|
|
81
|
+
run: bundle exec rake
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
#
|
|
7
|
+
# ******** NOTE ********
|
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
+
# supported CodeQL languages.
|
|
11
|
+
#
|
|
12
|
+
name: "CodeQL Advanced"
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: [ "master" ]
|
|
17
|
+
pull_request:
|
|
18
|
+
schedule:
|
|
19
|
+
- cron: '28 0 * * 1'
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
analyze:
|
|
23
|
+
name: Analyze (${{ matrix.language }})
|
|
24
|
+
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
|
25
|
+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
|
26
|
+
# - https://gh.io/supported-runners-and-hardware-resources
|
|
27
|
+
# - https://gh.io/using-larger-runners (GitHub.com only)
|
|
28
|
+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
permissions:
|
|
31
|
+
# required for all workflows
|
|
32
|
+
security-events: write
|
|
33
|
+
|
|
34
|
+
# required to fetch internal or private CodeQL packs
|
|
35
|
+
packages: read
|
|
36
|
+
|
|
37
|
+
# only required for workflows in private repositories
|
|
38
|
+
actions: read
|
|
39
|
+
contents: read
|
|
40
|
+
|
|
41
|
+
strategy:
|
|
42
|
+
fail-fast: false
|
|
43
|
+
matrix:
|
|
44
|
+
include:
|
|
45
|
+
- language: actions
|
|
46
|
+
build-mode: none
|
|
47
|
+
- language: ruby
|
|
48
|
+
build-mode: none
|
|
49
|
+
steps:
|
|
50
|
+
- name: Checkout repository
|
|
51
|
+
uses: actions/checkout@v4
|
|
52
|
+
|
|
53
|
+
# Initializes the CodeQL tools for scanning.
|
|
54
|
+
- name: Initialize CodeQL
|
|
55
|
+
uses: github/codeql-action/init@v4
|
|
56
|
+
with:
|
|
57
|
+
languages: ${{ matrix.language }}
|
|
58
|
+
build-mode: ${{ matrix.build-mode }}
|
|
59
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
60
|
+
# By default, queries listed here will override any specified in a config file.
|
|
61
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
62
|
+
|
|
63
|
+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
64
|
+
# queries: security-extended,security-and-quality
|
|
65
|
+
|
|
66
|
+
# If the analyze step fails for one of the languages you are analyzing with
|
|
67
|
+
# "We were unable to automatically build your code", modify the matrix above
|
|
68
|
+
# to set the build mode to "manual" for that language. Then modify this step
|
|
69
|
+
# to build your code.
|
|
70
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
71
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
72
|
+
- name: Run manual build steps
|
|
73
|
+
if: matrix.build-mode == 'manual'
|
|
74
|
+
shell: bash
|
|
75
|
+
run: |
|
|
76
|
+
echo 'If you are using a "manual" build mode for one or more of the' \
|
|
77
|
+
'languages you are analyzing, replace this with the commands to build' \
|
|
78
|
+
'your code, for example:'
|
|
79
|
+
echo ' make bootstrap'
|
|
80
|
+
echo ' make release'
|
|
81
|
+
exit 1
|
|
82
|
+
|
|
83
|
+
- name: Perform CodeQL Analysis
|
|
84
|
+
uses: github/codeql-action/analyze@v4
|
|
85
|
+
with:
|
|
86
|
+
category: "/language:${{matrix.language}}"
|
data/.standard.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
# pg_search changelog
|
|
2
2
|
|
|
3
|
-
## 2.
|
|
3
|
+
## 2.4.0 - 2026-09-07
|
|
4
|
+
|
|
5
|
+
* Drop support for Active Record 7.2
|
|
6
|
+
* Replace internal SQL-string manipulation with composable Arel operations while preserving all existing use cases
|
|
7
|
+
|
|
8
|
+
## 2.3.8 - 2026-08-10
|
|
9
|
+
|
|
10
|
+
* Drop support for Ruby 3.0, 3.1, and 3.2
|
|
11
|
+
* Drop support for Active Record 6.1, 7.0, and 7.1
|
|
12
|
+
* Support Ruby 3.4 and 4.0
|
|
13
|
+
* Support Active Record 8.0 and 8.1
|
|
14
|
+
* Fix ordered searches and associated ordering that use the internal rank join (fatkodima)
|
|
15
|
+
* Sanitize query characters introduced by unaccent normalization (Misha Doronin)
|
|
16
|
+
* Support keyword arguments for dynamic rank and highlight accessors (Manuel Meurer)
|
|
17
|
+
* Quote custom primary key and inheritance column identifiers in multisearch rebuild SQL
|
|
18
|
+
* Improve documentation (Olli)
|
|
19
|
+
|
|
20
|
+
## 2.3.7 - 2024-08-11
|
|
4
21
|
|
|
5
22
|
* Drop support for Ruby 2.6 and 2.7
|
|
6
23
|
* Drop support for Active Record 6.0 and earlier
|
|
@@ -11,7 +28,7 @@
|
|
|
11
28
|
* add support for Arel::Nodes::SqlLiteral columns (Kyle Fazzari)
|
|
12
29
|
* Improve documentation (Prima Aulia Gusta, Ross Baird, Andy Atkinson)
|
|
13
30
|
|
|
14
|
-
## 2.3.6
|
|
31
|
+
## 2.3.6 - 2022-01-07
|
|
15
32
|
|
|
16
33
|
* Drop support for Ruby 2.5
|
|
17
34
|
* Support Ruby 3.1
|
|
@@ -20,186 +37,186 @@
|
|
|
20
37
|
* Optionally disable transaction when rebuilding documents (Travis Hunter)
|
|
21
38
|
* Preserve columns when chaining ::with_pg_search_highlight (jcsanti)
|
|
22
39
|
|
|
23
|
-
## 2.3.5
|
|
40
|
+
## 2.3.5 - 2020-11-16
|
|
24
41
|
|
|
25
42
|
* Add table of contents to README (Barry Woolgar)
|
|
26
43
|
* Add support for Active Record 6.1
|
|
27
44
|
|
|
28
|
-
## 2.3.4
|
|
45
|
+
## 2.3.4 - 2020-10-10
|
|
29
46
|
|
|
30
47
|
* Fix issue when setting various options directly on the `PgSearch` module while
|
|
31
48
|
running with a threaded web server, such as Puma. (Anton Rieder)
|
|
32
49
|
|
|
33
|
-
## 2.3.3
|
|
50
|
+
## 2.3.3 - 2020-09-20
|
|
34
51
|
|
|
35
52
|
* Drop support for Ruby < 2.5.
|
|
36
53
|
* Use keyword argument for `clean_up` setting in `PgSearch::Multisearch.rebuild`.
|
|
37
54
|
|
|
38
|
-
## 2.3.2
|
|
55
|
+
## 2.3.2 - 2020-01-13
|
|
39
56
|
|
|
40
57
|
* Autoload `PgSearch::Document` to prevent it from being loaded in projects that are not using multi-search.
|
|
41
58
|
* Rebuilder should use `update_pg_search_document` if `additional_attributes` is set. (David Ramalho)
|
|
42
59
|
|
|
43
|
-
## 2.3.1
|
|
60
|
+
## 2.3.1 - 2019-12-22
|
|
44
61
|
|
|
45
62
|
* Drop support for Active Record < 5.2.
|
|
46
63
|
* Do not load railtie unless Rails::Railtie is defined, to avoid problem when loading alongside Action Mailer. (Adam Schwartz)
|
|
47
64
|
|
|
48
|
-
## 2.3.0
|
|
65
|
+
## 2.3.0 - 2019-07-13
|
|
49
66
|
|
|
50
67
|
* Extract `PgSearch::Model` module.
|
|
51
68
|
* Deprecate `include PgSearch`. Use `include PgSearch::Model` instead.
|
|
52
69
|
|
|
53
|
-
## 2.2.0
|
|
70
|
+
## 2.2.0 - 2019-05-26
|
|
54
71
|
|
|
55
72
|
* Add `word_similarity` option to trigram search. (Severin Räz)
|
|
56
73
|
|
|
57
|
-
## 2.1.7
|
|
74
|
+
## 2.1.7 - 2019-04-20
|
|
58
75
|
|
|
59
76
|
* Restore link to GitHub repository to original location.
|
|
60
77
|
|
|
61
|
-
## 2.1.6
|
|
78
|
+
## 2.1.6 - 2019-04-18
|
|
62
79
|
|
|
63
80
|
* Update link to GitHub repository to new location.
|
|
64
81
|
|
|
65
|
-
## 2.1.5
|
|
82
|
+
## 2.1.5 - 2019-04-08
|
|
66
83
|
|
|
67
84
|
* Drop support for Ruby < 2.4.
|
|
68
85
|
|
|
69
|
-
## 2.1.4
|
|
86
|
+
## 2.1.4 - 2019-01-26
|
|
70
87
|
|
|
71
88
|
* Drop support for Ruby < 2.3.
|
|
72
89
|
* Use `update` instead of deprecated `update_attributes`.
|
|
73
90
|
* Remove explicit Arel dependency to better support Active Record 6 beta.
|
|
74
91
|
|
|
75
|
-
## 2.1.3
|
|
92
|
+
## 2.1.3 - 2018-12-09
|
|
76
93
|
|
|
77
94
|
* Drop support for Ruby < 2.2
|
|
78
95
|
* Disallow left/right single quotation marks in tsquery. (Fabian Schwahn) (#382)
|
|
79
96
|
* Do not attempt to save an already-destroyed `PgSearch::Document`. (Oleg Dashevskii, Vokhmin Aleksei V) (#353)
|
|
80
97
|
* Quote column name when rebuilding. (Jed Levin) (#379)
|
|
81
98
|
|
|
82
|
-
## 2.1.2
|
|
99
|
+
## 2.1.2 - 2017-12-25
|
|
83
100
|
|
|
84
101
|
* Silence warnings in Rails 5.2.0.beta2. (Kevin Deisz)
|
|
85
102
|
|
|
86
|
-
## 2.1.1
|
|
103
|
+
## 2.1.1 - 2017-09-20
|
|
87
104
|
|
|
88
105
|
* Support snake_case `ts_headline` options again. (with deprecation warning)
|
|
89
106
|
|
|
90
|
-
## 2.1.0
|
|
107
|
+
## 2.1.0 - 2017-07-29
|
|
91
108
|
|
|
92
109
|
* Allow `ts_headline` options to be passed to `:highlight`. (Ian Heisters)
|
|
93
110
|
* Wait to load `PgSearch::Document` until after Active Record has loaded. (Logan Leger)
|
|
94
111
|
* Add Rails version to generated migrations. (Erik Eide)
|
|
95
112
|
|
|
96
|
-
## 2.0.1
|
|
113
|
+
## 2.0.1 - 2016-12-20
|
|
97
114
|
|
|
98
115
|
* Remove require for generator that no longer exists. (Joshua Bartlett)
|
|
99
116
|
|
|
100
|
-
## 2.0.0
|
|
117
|
+
## 2.0.0 - 2016-12-19
|
|
101
118
|
|
|
102
119
|
* Drop support for PostgreSQL < 9.2.
|
|
103
120
|
* Drop support for Active Record < 4.2.
|
|
104
121
|
* Drop support for Ruby < 2.1.
|
|
105
122
|
* Improve performance of has_one and belongs_to associations. (Peter Postma)
|
|
106
123
|
|
|
107
|
-
## 1.0.6
|
|
124
|
+
## 1.0.6 - 2016-05-22
|
|
108
125
|
|
|
109
126
|
* Add support for highlighting the matching portion of a search result. (Jose Galisteo)
|
|
110
127
|
* Add `:update_if` option to control when PgSearch::Document gets updated. (Adam Becker)
|
|
111
128
|
* Add `:additional_attributes` option for adding additional attributes to PgSearch::Document
|
|
112
129
|
|
|
113
|
-
## 1.0.5
|
|
130
|
+
## 1.0.5 - 2015-08-30
|
|
114
131
|
|
|
115
132
|
* Clean up rank table aliasing. (Adam Milligan)
|
|
116
133
|
* Fix issue when using `#with_pg_search_rank` across a join. (Reid Lynch)
|
|
117
134
|
|
|
118
|
-
## 1.0.4
|
|
135
|
+
## 1.0.4 - 2015-06-14
|
|
119
136
|
|
|
120
137
|
* Assert valid options for features. (Janko Marohnić)
|
|
121
138
|
* Enable chaining of pg_search scopes. (Nicolas Buduroi)
|
|
122
139
|
|
|
123
|
-
## 1.0.3
|
|
140
|
+
## 1.0.3 - 2015-05-11
|
|
124
141
|
|
|
125
142
|
* Support STI models using a custom inheritance column. (Nick Doiron)
|
|
126
143
|
|
|
127
|
-
## 1.0.2
|
|
144
|
+
## 1.0.2 - 2015-05-04
|
|
128
145
|
|
|
129
146
|
* 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.
|
|
130
147
|
|
|
131
|
-
## 1.0.1
|
|
148
|
+
## 1.0.1 - 2015-05-02
|
|
132
149
|
|
|
133
150
|
* Call `.unscoped` on relation used to build subquery, to eliminate unnecessary JOINs. (Markus Doits)
|
|
134
151
|
|
|
135
|
-
## 1.0.0
|
|
152
|
+
## 1.0.0 - 2015-04-19
|
|
136
153
|
|
|
137
154
|
* Support more `ActiveRecord::Relation` methods, such as `#pluck` and `#select` by moving search-related operations to subquery.
|
|
138
155
|
* Generate index by default in migration for `pg_search_documents` table.
|
|
139
156
|
* Start officially using [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html).
|
|
140
157
|
|
|
141
|
-
## 0.7.9
|
|
158
|
+
## 0.7.9 - 2015-02-04
|
|
142
159
|
|
|
143
160
|
* Improve support for single table inheritance (STI) models. (Ewan McDougall)
|
|
144
161
|
|
|
145
|
-
## 0.7.8
|
|
162
|
+
## 0.7.8 - 2014-09-06
|
|
146
163
|
|
|
147
164
|
* Stop inadvertently including binstubs for guard and rspec.
|
|
148
165
|
|
|
149
|
-
## 0.7.7
|
|
166
|
+
## 0.7.7 - 2014-09-05
|
|
150
167
|
|
|
151
168
|
* Fix future compatibility with Active Record 4.2.
|
|
152
169
|
|
|
153
|
-
## 0.7.6
|
|
170
|
+
## 0.7.6 - 2014-07-16
|
|
154
171
|
|
|
155
172
|
* Fix migration generator in Rails 3. (Andrew Marshall and Nora Lin)
|
|
156
173
|
* Add `:only` option for limiting search fields per feature. (Jonathan Greenberg)
|
|
157
174
|
|
|
158
|
-
## 0.7.5
|
|
175
|
+
## 0.7.5 - 2014-07-15
|
|
159
176
|
|
|
160
177
|
* Add option to make feature available only for sorting. (Brent Wheeldon)
|
|
161
178
|
|
|
162
|
-
## 0.7.4
|
|
179
|
+
## 0.7.4 - 2014-05-19
|
|
163
180
|
|
|
164
181
|
* Fix which STI class name is used for searchable_type for PgSearch::Document. (Ewan McDougall)
|
|
165
182
|
* Add support for non-standard primary keys. (Matt Beedle)
|
|
166
183
|
|
|
167
|
-
## 0.7.3
|
|
184
|
+
## 0.7.3 - 2014-01-26
|
|
168
185
|
|
|
169
186
|
* Allow simultaneously searching using `:associated_against` and `:tsvector_column` (Adam Becker)
|
|
170
187
|
|
|
171
|
-
## 0.7.2
|
|
188
|
+
## 0.7.2 - 2013-11-20
|
|
172
189
|
|
|
173
190
|
* Add :threshold option for configuring how permissive trigram searches are.
|
|
174
191
|
|
|
175
|
-
## 0.7.1
|
|
192
|
+
## 0.7.1 - 2013-11-20
|
|
176
193
|
|
|
177
194
|
* Fix issue with {:using => :trigram, :ignoring => :accents} that generated
|
|
178
195
|
bad SQL. (Steven Harman)
|
|
179
196
|
|
|
180
|
-
## 0.7.0
|
|
197
|
+
## 0.7.0 - 2013-07-05
|
|
181
198
|
|
|
182
199
|
* Start requiring Ruby 1.9.2 or later.
|
|
183
200
|
|
|
184
|
-
## 0.6.4
|
|
201
|
+
## 0.6.4 - 2013-05-26
|
|
185
202
|
|
|
186
203
|
* Fix issue with using more than two features in the same scope.
|
|
187
204
|
|
|
188
|
-
## 0.6.3
|
|
205
|
+
## 0.6.3 - 2013-05-12
|
|
189
206
|
|
|
190
207
|
* Fix issues and deprecations for Active Record 4.0.0.rc1.
|
|
191
208
|
|
|
192
|
-
## 0.6.2
|
|
209
|
+
## 0.6.2 - 2013-04-20
|
|
193
210
|
|
|
194
211
|
* Add workaround for issue with how ActiveRecord relations handle Arel OR
|
|
195
212
|
nodes.
|
|
196
213
|
|
|
197
|
-
## 0.6.1
|
|
214
|
+
## 0.6.1 - 2013-04-08
|
|
198
215
|
|
|
199
216
|
* Fix issue with Arel::InfixOperation that prevented #count from working,
|
|
200
217
|
breaking pagination.
|
|
201
218
|
|
|
202
|
-
## 0.6.0
|
|
219
|
+
## 0.6.0 - 2013-04-02
|
|
203
220
|
|
|
204
221
|
* Drop support for Active Record 3.0.
|
|
205
222
|
* Address warnings in Ruby 2.0.
|
|
@@ -209,49 +226,49 @@
|
|
|
209
226
|
* Support named schemas in pg_search:multisearch:rebuild. (Victor Olteanu)
|
|
210
227
|
|
|
211
228
|
|
|
212
|
-
## 0.5.7
|
|
229
|
+
## 0.5.7 - 2012-10-07
|
|
213
230
|
|
|
214
231
|
* Fix issue with eager loading now that the Scope class has been removed.
|
|
215
232
|
(Piotr Murach)
|
|
216
233
|
|
|
217
234
|
|
|
218
|
-
## 0.5.6
|
|
235
|
+
## 0.5.6 - 2012-09-29
|
|
219
236
|
|
|
220
237
|
* PgSearch#multisearchable accepts :if and :unless for conditional inclusion
|
|
221
238
|
in search documents table. (Francois Harbec)
|
|
222
239
|
* Stop using array_to_string() in SQL since it is not indexable.
|
|
223
240
|
|
|
224
241
|
|
|
225
|
-
## 0.5.5
|
|
242
|
+
## 0.5.5 - 2012-09-16
|
|
226
243
|
|
|
227
244
|
* Fix bug with single table inheritance.
|
|
228
245
|
* Allow option for specifying an alternate function for unaccent().
|
|
229
246
|
|
|
230
247
|
|
|
231
|
-
## 0.5.4
|
|
248
|
+
## 0.5.4 - 2012-09-07
|
|
232
249
|
|
|
233
250
|
* Fix bug in associated_against join clause when search scope is chained
|
|
234
251
|
after other scopes.
|
|
235
252
|
* Fix autoloading of PgSearch::VERSION constant.
|
|
236
253
|
|
|
237
254
|
|
|
238
|
-
## 0.5.3
|
|
255
|
+
## 0.5.3 - 2012-09-06
|
|
239
256
|
|
|
240
257
|
* Prevent multiple attempts to create pg_search_document within a single
|
|
241
258
|
transaction. (JT Archie & Trace Wax)
|
|
242
259
|
|
|
243
260
|
|
|
244
|
-
## 0.5.2
|
|
261
|
+
## 0.5.2 - 2012-09-06
|
|
245
262
|
|
|
246
263
|
* Don't save twice if pg_search_document is missing on update.
|
|
247
264
|
|
|
248
265
|
|
|
249
|
-
## 0.5.1
|
|
266
|
+
## 0.5.1 - 2012-08-01
|
|
250
267
|
|
|
251
268
|
* Add ability to override multisearch rebuild SQL.
|
|
252
269
|
|
|
253
270
|
|
|
254
|
-
## 0.5
|
|
271
|
+
## 0.5 - 2012-05-13
|
|
255
272
|
|
|
256
273
|
* Convert migration rake tasks into generators.
|
|
257
274
|
* Use rake task arguments for multisearch rebuild instead of environment
|
|
@@ -259,7 +276,7 @@
|
|
|
259
276
|
* Always cast columns to text.
|
|
260
277
|
|
|
261
278
|
|
|
262
|
-
## 0.4.2
|
|
279
|
+
## 0.4.2 - 2012-05-09
|
|
263
280
|
|
|
264
281
|
* Fill in timestamps correctly when rebuilding multisearch documents.
|
|
265
282
|
(Barton McGuire)
|
|
@@ -269,7 +286,7 @@
|
|
|
269
286
|
* Fix issue with :associated_against and non-text columns.
|
|
270
287
|
|
|
271
288
|
|
|
272
|
-
## 0.4.1
|
|
289
|
+
## 0.4.1 - 2012-02-13
|
|
273
290
|
|
|
274
291
|
* Fix Active Record 3.2 deprecation warnings. (Steven Harman)
|
|
275
292
|
|
|
@@ -277,18 +294,18 @@
|
|
|
277
294
|
defined.
|
|
278
295
|
|
|
279
296
|
|
|
280
|
-
## 0.4
|
|
297
|
+
## 0.4 - 2011-12-15
|
|
281
298
|
|
|
282
299
|
* Add ability to search again tsvector columns. (Kris Hicks)
|
|
283
300
|
|
|
284
301
|
|
|
285
|
-
## 0.3.4
|
|
302
|
+
## 0.3.4 - 2011-11-25
|
|
286
303
|
|
|
287
304
|
* Fix issue with {:using => {:tsearch => {:prefix => true}}} and hyphens.
|
|
288
305
|
* Get tests running against PostgreSQL 9.1 by using CREATE EXTENSION
|
|
289
306
|
|
|
290
307
|
|
|
291
|
-
## 0.3.3
|
|
308
|
+
## 0.3.3 - 2011-10-22
|
|
292
309
|
|
|
293
310
|
* Backport array_agg() aggregate function to PostgreSQL 8.3 and earlier.
|
|
294
311
|
This fixes :associated_against searches.
|
|
@@ -298,18 +315,18 @@
|
|
|
298
315
|
earlier.
|
|
299
316
|
|
|
300
317
|
|
|
301
|
-
## 0.3.2
|
|
318
|
+
## 0.3.2 - 2011-10-18
|
|
302
319
|
|
|
303
320
|
* Fix :prefix search in PostgreSQL 8.x
|
|
304
321
|
* Disable {:ignoring => :accents} in PostgreSQL 8.x
|
|
305
322
|
|
|
306
323
|
|
|
307
|
-
## 0.3.1
|
|
324
|
+
## 0.3.1 - 2011-09-08
|
|
308
325
|
|
|
309
326
|
* Fix syntax error in generated dmetaphone migration. (Max De Marzi)
|
|
310
327
|
|
|
311
328
|
|
|
312
|
-
## 0.3
|
|
329
|
+
## 0.3 - 2011-09-06
|
|
313
330
|
|
|
314
331
|
* Drop Active Record 2.0 support.
|
|
315
332
|
* Add PgSearch.multisearch for cross-model searching.
|
|
@@ -319,16 +336,16 @@
|
|
|
319
336
|
* Add :any_word option to :tsearch which uses OR between query terms instead
|
|
320
337
|
of AND. (Fernando Espinosa)
|
|
321
338
|
|
|
322
|
-
## 0.2.2
|
|
339
|
+
## 0.2.2 - 2013-07-08
|
|
323
340
|
|
|
324
341
|
* Fix a compatibility issue between Ruby 1.8.7 and 1.9.3 when using Rails 2
|
|
325
342
|
(James Badger)
|
|
326
343
|
|
|
327
|
-
## 0.2.1
|
|
344
|
+
## 0.2.1 - 2011-12-15
|
|
328
345
|
|
|
329
346
|
* Backport support for searching against tsvector columns (Kris Hicks)
|
|
330
347
|
|
|
331
|
-
## 0.2
|
|
348
|
+
## 0.2 - 2011-05-11
|
|
332
349
|
|
|
333
350
|
* Set dictionary to :simple by default for :tsearch. Before it was unset,
|
|
334
351
|
which would fall back to PostgreSQL's default dictionary, usually
|
|
@@ -337,22 +354,22 @@
|
|
|
337
354
|
* Improve performance of :associated_against by only doing one INNER JOIN
|
|
338
355
|
per association
|
|
339
356
|
|
|
340
|
-
## 0.1.1
|
|
357
|
+
## 0.1.1 - 2011-01-20
|
|
341
358
|
|
|
342
359
|
* Fix a bug with dmetaphone searches containing " w " (which dmetaphone maps
|
|
343
360
|
to an empty string)
|
|
344
361
|
|
|
345
|
-
## 0.1
|
|
362
|
+
## 0.1 - 2011-01-18
|
|
346
363
|
|
|
347
364
|
* Change API to {:ignoring => :accents} from {:normalizing => :diacritics}
|
|
348
365
|
* Improve documentation
|
|
349
366
|
* Fix bug where :associated_against would not work without an :against
|
|
350
367
|
present
|
|
351
368
|
|
|
352
|
-
## 0.0.2
|
|
369
|
+
## 0.0.2 - 2011-01-14
|
|
353
370
|
|
|
354
371
|
* Fix gem ownership.
|
|
355
372
|
|
|
356
|
-
## 0.0.1
|
|
373
|
+
## 0.0.1 - 2011-01-14
|
|
357
374
|
|
|
358
375
|
* Initial release.
|
data/CONTRIBUTING.md
CHANGED
|
@@ -12,7 +12,7 @@ Don't be discouraged if the maintainers ask you to change your code. We are alwa
|
|
|
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="~> 8.0.0" bundle update
|
|
16
16
|
|
|
17
17
|
Run the tests by running `bundle exec rake`, or `bin/rake` if you use Bundler binstubs.
|
|
18
18
|
|
data/Gemfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
source "https://rubygems.org"
|
|
3
|
+
source "https://rubygems.org", cooldown: 7
|
|
4
4
|
|
|
5
5
|
gemspec
|
|
6
6
|
|
|
@@ -14,15 +14,17 @@ end
|
|
|
14
14
|
|
|
15
15
|
gem "activerecord", ENV.fetch("ACTIVE_RECORD_VERSION", nil) if ENV["ACTIVE_RECORD_VERSION"] # standard:disable Bundler/DuplicatedGem
|
|
16
16
|
|
|
17
|
+
gem "benchmark"
|
|
17
18
|
gem "debug"
|
|
18
19
|
gem "irb"
|
|
20
|
+
gem "mutex_m"
|
|
19
21
|
gem "rake"
|
|
20
22
|
gem "rspec"
|
|
23
|
+
gem "ruby-lsp"
|
|
21
24
|
gem "simplecov"
|
|
22
25
|
gem "simplecov-lcov"
|
|
23
26
|
gem "standard", require: false
|
|
24
27
|
gem "standard-rails", require: false
|
|
25
28
|
gem "standard-rspec", require: false
|
|
26
|
-
gem "undercover"
|
|
27
29
|
gem "warning"
|
|
28
30
|
gem "with_model"
|
data/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c) 2010–
|
|
1
|
+
Copyright (c) 2010–2026 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
|