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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8701d60187af1ad0460c88d00294d05e4a2b844276ad8b3986b29babc41be15
4
- data.tar.gz: 3618abfbe086adfef098af5c2c7672d1021bf86839cd8503c76caa5961ccae6b
3
+ metadata.gz: 2f4f614bb0fa282ac0bb258122139efd64f81ac8f04eb3dd4fd2c0e80c9f9d5a
4
+ data.tar.gz: c4292d5984bf2e3774b7f73948173ea2b4f022d2d29989b3a57222b3b516b02a
5
5
  SHA512:
6
- metadata.gz: 9ed5a212569e382a8b40a6dcc67f1f24a3af1adcb5dee59d28721db890a7da93dffa16afec5b79dfcd53b19d525369171a24078b9586389f677df7883a8b2e56
7
- data.tar.gz: ca268b23a69304788491dad1f79680b91d56714cadd45b175aeed9773a02088c9ffc4a83704f831d7c8d755a4b48b537e905614142dfa6c26c511babb9d517cf
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 | Description |
43
- | ---------------- | :------ | :----------- |
44
- | `tsvector_column` | `tsv` | If you have a different column containing your tsvector, specify it here. |
45
- | `search_type` | `nil` | Your PostgreSQL probably defaults to `'english'`, but 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. |
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
 
@@ -19,7 +19,7 @@ module PgFulltext
19
19
  relation,
20
20
  query,
21
21
  tsvector_column: :tsv,
22
- search_type: nil,
22
+ search_type: :simple,
23
23
  order: true,
24
24
  prefix: true,
25
25
  reorder: false,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_fulltext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Robertson