textacular 4.0.0 → 4.0.1
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/CHANGELOG.md +8 -0
- data/README.md +10 -0
- data/lib/textacular/trigram_installer.rb +1 -1
- data/lib/textacular/version.rb +1 -1
- data/spec/textacular/trigram_installer_spec.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 496462806ce43763aaeefe0d72e47bf1ed300a4d
|
4
|
+
data.tar.gz: 1ce89e8864290e04eccbf312aac17b65dac96211
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aec40e799a52f138444950693b6606446c50d011fb17fabb3d96218c2831693498ba89584f474c0539a2dd48b3eb45596f9c443362812696fd85419069889138
|
7
|
+
data.tar.gz: d3f7dffb02381e1364474c1df66c0a464d9927794c354569de0905e434d58e5e449d012c5bd656c3c74fc2e034a99e87ddb40f7a3e11f5d3ec24224bd668935f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -125,6 +125,16 @@ end
|
|
125
125
|
|
126
126
|
And all your queries would go right! And don`t forget to change the migration for indexes, like shown below.
|
127
127
|
|
128
|
+
### Setting Searchable Columns
|
129
|
+
|
130
|
+
To change the default behavior of searching all text and string columns,
|
131
|
+
override the searchable_columns class method on your model:
|
132
|
+
|
133
|
+
```ruby
|
134
|
+
def self.searchable_columns
|
135
|
+
[:column1, :column2]
|
136
|
+
end
|
137
|
+
```
|
128
138
|
|
129
139
|
### Creating Indexes for Super Speed
|
130
140
|
You can have Postgresql use an index for the full-text search. To declare a full-text index, in a
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class Textacular::TrigramInstaller
|
2
2
|
def generate_migration
|
3
3
|
content = <<-MIGRATION
|
4
|
-
class InstallTrigram < ActiveRecord::Migration
|
4
|
+
class InstallTrigram < ActiveRecord::Migration[5.0]
|
5
5
|
def self.up
|
6
6
|
ActiveRecord::Base.connection.execute("CREATE EXTENSION IF NOT EXISTS pg_trgm;")
|
7
7
|
end
|
data/lib/textacular/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
RSpec.describe "Textacular::TrigramInstaller" do
|
2
2
|
let(:content) do
|
3
3
|
<<-MIGRATION
|
4
|
-
class InstallTrigram < ActiveRecord::Migration
|
4
|
+
class InstallTrigram < ActiveRecord::Migration[5.0]
|
5
5
|
def self.up
|
6
6
|
ActiveRecord::Base.connection.execute("CREATE EXTENSION IF NOT EXISTS pg_trgm;")
|
7
7
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: textacular
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Hamill
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-
|
14
|
+
date: 2016-10-18 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: pg
|
@@ -104,9 +104,9 @@ dependencies:
|
|
104
104
|
- - ">="
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '3.0'
|
107
|
-
- - "
|
107
|
+
- - "<"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '5.
|
109
|
+
version: '5.1'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -114,9 +114,9 @@ dependencies:
|
|
114
114
|
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '3.0'
|
117
|
-
- - "
|
117
|
+
- - "<"
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: '5.
|
119
|
+
version: '5.1'
|
120
120
|
description: |-
|
121
121
|
Textacular exposes full text search capabilities from PostgreSQL, extending
|
122
122
|
ActiveRecord with scopes making search easy and fun!
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.
|
184
|
+
rubygems_version: 2.2.2
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: Textacular exposes full text search capabilities from PostgreSQL
|