studiomitte/typesense-search
Composer 安装命令:
composer require studiomitte/typesense-search
包简介
README 文档
README
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.
Features
- Integration of
InstantSearchfor an awesome search experience - Facets
- Proxy for hiding typesense endpoint
- Custom filtering to use search for different scopes like
- language
- record types
What this extension does not provide
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)
Setup
Installation
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.
Configuration
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.
Indexing
There are 2 options supported how to index your records.
Sitemap for content
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=....'
Custom indexing
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!
Plugin & Templating
After indexing you can use the Search plugin to add the typeense instant search to your page.
Geosearch
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.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2024-10-15