Download the PHP package visuellverstehen/t3meilisearch without Composer
On this page you can find all versions of the php package visuellverstehen/t3meilisearch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download visuellverstehen/t3meilisearch
More information about visuellverstehen/t3meilisearch
Files in visuellverstehen/t3meilisearch
Package t3meilisearch
Short Description Extension to use Meilisearch as search.
License
Informations about the package t3meilisearch
t3meilisearch
Preparation
Install Meilisearch yourself and make sure it is running. Also make sure you get the host address the server is reachable at, because you will need to configure the extension with that host. Otherwhise the extension cannot communicate with Meilisearch.
You will also need poppler-utils
in order to index PDF files.
Installation
You can easily install the extension by using Composer:
You may have to activate the extension in TYPO3 10.4, but since TYPO3 11.5 this is not required anymore.
Configuration
Log into TYPO3 as an admin or systemmaintainer and go to the settings module. Adjust the configure for t3meilisearch by setting the following fields:
Host
The address the Meilisearch server is reachable at. Optionaly including the port.
Example:
Api
The key to authenticate the requests
Example:
Target page uid
The uid of the page where the main plugin lives (see Usage).
Example:
Index
You can define a custom index by replacing the default value provided by t3meilisearch.
Example:
Thats pretty much it. The extension will then index pages and pdfs after they've been cached.
Usage
It is recommended to create a new page which can be hidden but not disabled. Insert the plugin »Searchform with results (Pi1)«. This will show a search form and also results if available.
You can also use the »Searchform (Pi2)« plugin to only display a search form wich will redirect to the target page configured in the settings module. You may insert this plugin hardcoded into e.g. the footer like this:
Parsing content
By default everything inbetween <body></body>
is beeing indexed. You can limit this by using two HTML comments just like indexed_search does. If you use multiple blocks, only the first will be index.
Overriding templates
Because it's a basic TYPO3 extension build using Extbase, you can easily override the default templates and use you own. First configure an additional location for your templates and partials in your TypoScript for TYPO3 to look in:
Next you can copy and modify the default templates the way you like. It is important to replicate the namespace structure, otherwhise TYPO3 cannot find the templates and partials.
Exclude pages from indexing
You can disable the »Include in Search« checkbox when editing a page to prevent a page beeing indexed.
Dropping the index
Want a clear start? You can simply execute a HTTP request to drop the index:
A new index with the name configured in $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['t3meilisearch']['index']
will be created by t3meilisearch.
Removing specific documents
When there are old or unwanted results, you can easily remove the documents by executing a HTTP request. First find the id
of the document by searching through the Meilisearch dashboard. Then you can execute the following request to delete a document:
Add sorting option
By default t3meilisearch sorts the results by crdate (filetime for PDFs) descending. You can add simple sorting options by adding a select:
It is important that the sorting value is passed by the query key called sorting
. The value is composed by column-to-sort_direction-to-sort
. If you want more complex sorting you have to do it yourself.
Add type filtering
By default we add a two type to documents. page
for normale page content and pdf
for PDF files. You could index records yourself and add custom types. Filtering for types can be achieved by passing a types
parameter:
Meilisearch has an easy API to use: docs.meilisearch.com
All versions of t3meilisearch with dependencies
meilisearch/meilisearch-php Version ^1.6
spatie/pdf-to-text Version ^1.52.1