I’m using the search plugin by @distantnative for a bigger site with around 6500 pages. It’s a catalogue of a library. Compared to the built-in search, the plugin performs super fast thanks to sqlite-db. Excellent!
Now I want to make the search more selective and give the visitors the possibility to include or exclude specific fields. The built-in search algorithm can narrow down the results:
$results = $site->search($query, 'title|text');
But the plugin seems to ignore this argumnent. Instead, it always searches all fields that are included in the database.
It’s not about the field-options set in config.php, though. They affect the process of generating the index. In my use case I need the database to contain fields A, B, C but the search to look in either A or B or C (or A and B but not C, and so on).
The helper function of the plugin expects options as Array:
search(string $query, $options = , $collection = null)
But I can’t make it work. Tested with a fresh Plainkit and current plugin version, search page is built according to the recipe from the docs (using controller).