Pluggable web search component using crawler + database full text search. Inspired by Sphider.
- Create your .env settings file.
- Create your website classes, follow
Sites\RootBasicsas en example. - Make a request to
index.phpto generate the full text index. - Make a request to
query.phpto fetch the search results.
Add the following block to index.php:
use GuzzleHttp\RequestOptions;
$clientConfig = [];
if (getenv('CLIENT_USERNAME') && getenv('CLIENT_PASSWORD')) {
$clientConfig[RequestOptions::AUTH] = [getenv('CLIENT_USERNAME'), getenv('CLIENT_PASSWORD')];
}Pass the $clientConfig variable to the Spatie crawler constructor.