Skip to content

Commit 5a297e9

Browse files
committed
Update readme and changelog.
1 parent 5153783 commit 5a297e9

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to `pmatseykanets/laravel-hipchat-slash` will be documented
44

55
## [Unreleased]
66
### Added
7-
- Configurable search config
7+
- Configurable PostgreSQL search config
88

99
## [0.3.0](https://github.com/pmatseykanets/laravel-scout-postgres/releases/tag/v0.3.0) - 2017-01-04
1010
### Changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ Specify the database connection that should be used to access indexed documents
5858
// You may want to update index documents directly in PostgreSQL (i.e. via triggers).
5959
// In this case you can set this value to false.
6060
'maintain_index' => true,
61-
// You can override the default text search configuration. Null uses the default.
62-
'search_configuration' => null,
61+
// You can explicitly specify what PostgreSQL text search config to use by scout.
62+
// Use \dF in psql to see all available configurations in your database.
63+
'config' => 'english',
6364
],
6465
...
6566
```
@@ -74,7 +75,6 @@ To check the current value
7475

7576
```sql
7677
SHOW default_text_search_config;
77-
7878
```
7979

8080
### Prepare the Schema
@@ -121,7 +121,6 @@ public function toSearchableArray()
121121
'tags' => $this->tags->pluck('tag')->implode(' '),
122122
];
123123
}
124-
125124
```
126125

127126
### Configuring the Model
@@ -165,13 +164,16 @@ class Post extends Model
165164
// Normalization index. Default 0.
166165
'normalization' => 32,
167166
],
167+
// You can explicitly specify a PostgreSQL text search configuration for the model.
168+
// Use \dF in psql to see all available configurationsin your database.
169+
'config' => 'simple',
168170
];
169171
}
170172
}
171173
...
172174
```
173175

174-
If you decide to keep your Model's index outside of the Model's table you can let engine know that you want to push additional fields in the index table that you can than use to filter the result set by using `where()` with the Scout `Builder`. In this case you'd need to implement `searchableAdditionalArray()` on your Model. Of course the schema for the external table should include these additional columns.
176+
If you decide to keep your Model's index outside of the Model's table you can let engine know that you want to push additional fields in the index table that you can then use to filter the result set by applying `where()` with the Scout `Builder`. In this case you'd need to implement `searchableAdditionalArray()` on your Model. Of course the schema for the external table should include these additional columns.
175177

176178
```php
177179
public function searchableAdditionalArray()

0 commit comments

Comments
 (0)