teamtnt / laravel-scout-tntsearch-driver

Driver for Laravel Scout search package based on https://github.com/teamtnt/tntsearch
MIT License
1.1k stars 144 forks source link

Search for all words #111

Closed csb346 closed 7 years ago

csb346 commented 7 years ago

Performing a multiple word search, is it possible to retrieve models that have all terms indexed and not all models that have at least one os them indexed.

Example: 1- Title: Table vintage Body: beautiful furniture

2- Title: modern table Body: modern design

3- Title: beautiful chair Body: vintage design

Searching for "beautiful table" it returns all the items. How to get only the first one that has both words. Is that possible with fulltext search?

Thanks for the help and Grat job! :)

nticaric commented 7 years ago

Yes it's possible. It's called boolean search. It can be set in the configuration file config/scout.php

pedzed commented 5 years ago

@nticaric But when you enable boolean search, special characters don't work. #133

I would like to have all search terms included in the result set, but whilst allowing for special characters to be in the search query. How can that be achieved?