pg_fulltext 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -9
- data/lib/pg_fulltext/active_record.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: 2f4f614bb0fa282ac0bb258122139efd64f81ac8f04eb3dd4fd2c0e80c9f9d5a
|
4
|
+
data.tar.gz: c4292d5984bf2e3774b7f73948173ea2b4f022d2d29989b3a57222b3b516b02a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1890385e76798f005d56c8005aa32b23badbd9ad770822b61962f37016cbe9997ebe9dc090d0948654c29a0178b939c6c472ed80b4c4fed671e0015781444ed5
|
7
|
+
data.tar.gz: af5b0b8d46c2a5ee73ee5de50cdc5c6b9f8e36bcb616830207db36cd32072a6a2fe7b173baf35da5fb9f938b80da14cda44cc9d70f966e6e3704a8b230ab0a2e
|
data/README.md
CHANGED
@@ -39,15 +39,15 @@ MyModel.search('foo bar "include this phrase" !butnotthis !"and and also not thi
|
|
39
39
|
The defaults for this include support for negation, phrases, phrase negation, and prefix searches, but those can be
|
40
40
|
configured per the following options:
|
41
41
|
|
42
|
-
| Option | Default
|
43
|
-
| ---------------- |
|
44
|
-
| `tsvector_column` | `tsv`
|
45
|
-
| `search_type` | `
|
46
|
-
| `order` | `true`
|
47
|
-
| `prefix` | `true`
|
48
|
-
| `reorder` | `false`
|
49
|
-
| `any_word` | `false`
|
50
|
-
| `ignore_accents` | `false`
|
42
|
+
| Option | Default | Description |
|
43
|
+
| ---------------- | :------- | :----------- |
|
44
|
+
| `tsvector_column` | `tsv` | If you have a different column containing your tsvector, specify it here. |
|
45
|
+
| `search_type` | `simple` | Your PostgreSQL probably defaults to `'english'`, but the default for this option is `simple` to ensure the most predictable behavior. IMPORTANT: Set this to match the tsvector you've generated. |
|
46
|
+
| `order` | `true` | Whether or not the `order` method should be applied against the generated `rank` for the fulltext query. If you just care about returning matches and not their respective rank, set this to `false`. |
|
47
|
+
| `prefix` | `true` | Default search will match partial words as well as whole words. Set this to `false` if only whole words should be matched. |
|
48
|
+
| `reorder` | `false` | If you already have `order` set on this relation, it will take precedence over the fulltext `rank`. `reorder` will call clear, effectively clearing the existing order and applying `rank`. |
|
49
|
+
| `any_word` | `false` | Default search uses the `&` operator, ensuring that all terms are matched in the query. If you want to match _any_ term in the query, set this to `true`. |
|
50
|
+
| `ignore_accents` | `false` | By default, search queries with accents will be sent through as-is. Setting this to `true` will `unaccent()` the query, which helps match `tsv` columns that have also been unaccented. Alternatively, you can have your `tsv` column be a combination of both, and this option will be unnecesary. Requires the `unaccent` Postgres extension. |
|
51
51
|
|
52
52
|
## Standalone Configuration
|
53
53
|
|