Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Allows the use of SingleStore's match usage against full text indexes

License

Notifications You must be signed in to change notification settings

guywarner/laravel-singlestore-fulltext

Repository files navigation

Package to use SingleStore DB's match() function for full text search adding Model::match()->get() to Models

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A simple package to add match() function to Laravel models

User::match(['first_name', 'last_name'], 'Guy Warner')->get()

Installation

You can install the package via composer:

composer require guywarner/laravel-singlestore-fulltext

Add your FULLTEXT index. If the index is missing SDB will error with:

Can't find FULLTEXT index matching the column list

Extend the model you want to search:

use Guywarner\LaravelSinglestoreFulltext\Models\SingleStoreModel;

class Mopdel extends SingleStoreModel
{
}

Usage

Model::match(['column1', 'column2'], 'search term')->get();

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Allows the use of SingleStore's match usage against full text indexes

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages