How to use advances search server like Solr, Elasticsearch, Database ... With a Drupal 8 site ?
Search API and Database Search server.
1. Uninstall drupal basic Search
2. Install search_api and search_api_db
NOTE : You can also use another database configures on settings.php
3. Add a Search Server (/admin/config/search/search-api/add-server).
- Use "Database" as cackend server.
3. Add a Search Index (/admin/config/search/search-api/add-index).
- Select Enteties (Data source) to index with this index and a search server.
- Save and Add fields to Index. (Example : Title, Body file for "Contents").
- Optionaly you can configure "Processors" as Filters, Data traitements ...
4. Enable the newly created "Index" then run indexing or queue indexing.
5. Create a view using your Index, and add field "Search: Fulltext search" as Exposed criteris filter.
Once indexing is done, visit the view's page to use the search system.
Tips : For a quick start, just install the "Database Search Defaults" (), and configure your "Search Server", "Index" and "Search Pages" on.
- Search API : /admin/config/search/search-api
- Search Views : /admin/structure/views (Defaut : /admin/structure/views/view/search_content )
NOTE : To create a server like Solr, Elasticsearch you need to install search server and the drupal module for those servers.
Big thanks to this blog author