PHPackages                             pmatseykanets/laravel-scout-postgres - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. pmatseykanets/laravel-scout-postgres

ActiveLibrary[Database &amp; ORM](/categories/database)

pmatseykanets/laravel-scout-postgres
====================================

PostgreSQL Full Text Search Driver for Laravel Scout

v7.3.0(5y ago)164213.7k↓35.5%41[12 issues](https://github.com/pmatseykanets/laravel-scout-postgres/issues)[7 PRs](https://github.com/pmatseykanets/laravel-scout-postgres/pulls)2MITPHPPHP ^7.2|^8.0

Since Sep 2Pushed 3y ago3 watchersCompare

[ Source](https://github.com/pmatseykanets/laravel-scout-postgres)[ Packagist](https://packagist.org/packages/pmatseykanets/laravel-scout-postgres)[ Docs](https://github.com/pmatseykanets/laravel-scout-postgres)[ RSS](/packages/pmatseykanets-laravel-scout-postgres/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (24)Used By (2)

PostgreSQL Full Text Search Engine for Laravel Scout
====================================================

[](#postgresql-full-text-search-engine-for-laravel-scout)

[![Latest Version on Packagist](https://camo.githubusercontent.com/533dee65f4a4e65f30cba9c8a3112dfaec7023e267376cacdd79c0a508a3f4ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706d61747365796b616e6574732f6c61726176656c2d73636f75742d706f7374677265732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pmatseykanets/laravel-scout-postgres)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![tests](https://github.com/pmatseykanets/laravel-scout-postgres/workflows/tests/badge.svg)](https://github.com/pmatseykanets/laravel-scout-postgres/workflows/tests/badge.svg)[![StyleCI](https://camo.githubusercontent.com/f7582f5b35c80fb256b276d34ca4b6a05a542d0fc9819a569e6fedc59caa7b0e/68747470733a2f2f7374796c6563692e696f2f7265706f732f36373233333236352f736869656c64)](https://styleci.io/repos/67233265)[![Total Downloads](https://camo.githubusercontent.com/1538d7971ea9419a0cc6cdf343f4ce4e3f612b537fd1faae53b724ae8e66e65e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706d61747365796b616e6574732f6c61726176656c2d73636f75742d706f7374677265732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pmatseykanets/laravel-scout-postgres)[![License](https://camo.githubusercontent.com/27a4571ed6b340096ff12dbc2d90cf0eb7992c48692b06315d0013ef3ca7aebc/68747470733a2f2f706f7365722e707567782e6f72672f706d61747365796b616e6574732f6c61726176656c2d73636f75742d706f7374677265732f6c6963656e7365)](https://github.com/pmatseykanets/laravel-scout-postgres/blob/master/LICENSE.md)

This package makes it easy to use native PostgreSQL Full Text Search capabilities with [Laravel Scout](http://laravel.com/docs/master/scout).

If you find this package usefull, please consider bying me a coffee.

[![Buy Me a Coffee at ko-fi.com](https://camo.githubusercontent.com/154f15d832baabe75153bc6f3f3923cdd4eda07ed77efd80d92544ee1c381ddf/68747470733a2f2f63646e2e6b6f2d66692e636f6d2f63646e2f6b6f6669322e706e673f763d32)](https://ko-fi.com/V7V43MXAO)

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Laravel](#laravel)
    - [Lumen](#lumen)
- [Configuration](#configuration)
    - [Configuring the Engine](#configuring-the-engine)
    - [Configuring PostgreSQL](#configuring-postgresql)
    - [Prepare the Schema](#prepare-the-schema)
    - [Configuring Searchable Data](#configuring-searchable-data)
    - [Configuring the Model](#configuring-the-model)
- [Usage](#usage)
- [Testing](#testing)
- [Security](#security)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require pmatseykanets/laravel-scout-postgres
```

### Laravel

[](#laravel)

If you're using Laravel &lt; 5.5 or if you have package auto-discovery turned off you have to manually register the service provider:

```
// config/app.php
'providers' => [
    ...
    ScoutEngines\Postgres\PostgresEngineServiceProvider::class,
],
```

### Lumen

[](#lumen)

Scout service provider uses `config_path` helper that is not included in Lumen. To fix this include the following snippet either directly in `bootstrap.app` or in your autoloaded helpers file i.e. `app/helpers.php`.

```
if (! function_exists('config_path')) {
    /**
     * Get the configuration path.
     *
     * @param  string  $path
     * @return string
     */
    function config_path($path = '')
    {
        return app()->basePath() . '/config'.($path ? DIRECTORY_SEPARATOR.$path : $path);
    }
}
```

Create the `scout.php` config file in `app/config` folder with the following contents

```
