runestone 2.0.0 → 2.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/README.md +21 -1
- data/lib/runestone/active_record/base_methods.rb +1 -1
- data/lib/runestone/engine.rb +1 -0
- data/lib/runestone/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9cc3c57faf66f24e588729cd07884658c90dac82958b8ed40e3815137d883c7
|
4
|
+
data.tar.gz: 2dbb5e6894010cede04ac56bada21d2bd0b7c49a57f7fdab9dc40b0314604e23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c11c9698ef72f31dfd3164f2e71951dc15376f6d19035c187c51be3266041f8e2ae95ee7a47ca4d9435a9d9ab1263621603960b22b014d0318b029d3809108f3
|
7
|
+
data.tar.gz: a322fa991a557625b6c8bd640b4264450426bafcd5414315c895142084a40c64c57240612f0faa72ff19c8236533e330b81530798cc1a4219de62d7e08f588e8
|
data/README.md
CHANGED
@@ -92,6 +92,16 @@ The default dictionary that Runestone uses is the `runestone` dictionary. Which
|
|
92
92
|
is the `simple` dictionary in PostgreSQL with `unaccent` to tranliterate some
|
93
93
|
characters to the ASCII equivlent.
|
94
94
|
|
95
|
+
```ruby
|
96
|
+
module RailsApplicationName
|
97
|
+
class Application < Rails::Application
|
98
|
+
config.runestone.dictionary = :runesonte
|
99
|
+
end
|
100
|
+
end
|
101
|
+
```
|
102
|
+
|
103
|
+
If you are not using Rails, you can use the following:
|
104
|
+
|
95
105
|
```ruby
|
96
106
|
Runestone.dictionary = :runesonte
|
97
107
|
```
|
@@ -102,7 +112,17 @@ Ranking can be configured to use the `normalization` paramater as described
|
|
102
112
|
in the [PostgreSQL documentation][3]. The default is `16`
|
103
113
|
|
104
114
|
```ruby
|
105
|
-
|
115
|
+
module RailsApplicationName
|
116
|
+
class Application < Rails::Application
|
117
|
+
config.runestone.normalization = 1|16
|
118
|
+
end
|
119
|
+
end
|
120
|
+
```
|
121
|
+
|
122
|
+
If you are not using Rails, you can use the following:
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
Runestone.normalization = 16
|
106
126
|
```
|
107
127
|
|
108
128
|
[1]: http://rachbelaid.com/postgres-full-text-search-is-good-enough/
|
@@ -57,7 +57,7 @@ module Runestone::ActiveRecord
|
|
57
57
|
def highlights(name: :default, dictionary: nil)
|
58
58
|
dictionary ||= Runestone.dictionary
|
59
59
|
|
60
|
-
rsettings = self.runestone_settings[name].find { |s| s.dictionary.to_s == dictionary.to_s}
|
60
|
+
rsettings = self.runestone_settings[name].find { |s| s.dictionary.to_s == dictionary.to_s }
|
61
61
|
@highlights ||= highlight_indexes(rsettings.indexes.values.flatten.map{ |i| i.to_s.split('.') })
|
62
62
|
end
|
63
63
|
|
data/lib/runestone/engine.rb
CHANGED
@@ -14,6 +14,7 @@ class Runestone::Engine < Rails::Engine
|
|
14
14
|
|
15
15
|
Runestone.runner = options.runner if options.runner
|
16
16
|
Runestone.dictionary = options.dictionary if options.dictionary
|
17
|
+
Runestone.normalization = options.normalization if options.normalization
|
17
18
|
Runestone.job_queue = options.job_queue if options.job_queue
|
18
19
|
Runestone.typo_tolerances = options.typo_tolerances if options.typo_tolerances
|
19
20
|
end
|
data/lib/runestone/version.rb
CHANGED