This extension provides an integration of typesense search engine into TYPO3 CMS. It is still in an early stage and not yet feature complete.
I am however where interested in feedback and contributions.
- Integration of
InstantSearch
for an awesome search experience - Facets
- Proxy for hiding typesense endpoint
- Custom filtering to use search for different scopes like
- language
- record types
This extension is just in the beginning and is not yet a full alternative to other search extensions like solr.
- No queue, no monitoring of records, only full indexing possible
- No permission handling (records which are limited to user_groups)
- No time checks (starttime, stoptime)
Install the extension by using composer req studiomitte/typesense-search
. You then get also the dashboard at
http://yourproject.ddev.site:8109/
with login API key ddev
.
For testing, I suggest using ddev get kevinquillen/ddev-typesense
to get a typesense instance running locally.
For production, you should take a look at https://typesense.org/docs/guide/running-in-production.html#production-best-practices.
Copy the settings.yaml from Resources/Private/Examples/settings.yaml
to your site configuration and adjust it to your needs.
Especially important is the authentication
part.
There are 2 options supported how to index your records.
The following CLI call indexes a sitemap. Provide the site identifier as 1st argument and the URL as 2nd one.
# Use the pages sitemap generated by TYPO3
./bin/typo3 typesense:sitemap main 'https://www.domain.tld.com/sitemap.xml?sitemap=pages&cHash=....'
Copy the example EXT:typesense_search/Resources/Private/Examples/TypesenseImportCommand.php
to your site package/extension and adopt it your needs.
Don't forget to adopt the constants in the class to your needs!
After indexing you can use the Search plugin to add the typeense instant search to your page.
If using a geosearch, you need to index the coordinates like this
$document['_geoloc'] = [$row['lat'], $row['lng']];
and provide a Google Maps API in the Search/Index.html
template.