{"id":21543230,"url":"https://github.com/visuellverstehen/t3meilisearch","last_synced_at":"2025-04-10T04:38:21.941Z","repository":{"id":45320027,"uuid":"456458247","full_name":"visuellverstehen/t3meilisearch","owner":"visuellverstehen","description":"Use Meilisearch for your TYPO3 search","archived":false,"fork":false,"pushed_at":"2025-01-20T06:40:34.000Z","size":126,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-24T05:51:59.921Z","etag":null,"topics":["meilisearch","meilisearch-php","typo3","typo3-cms-extension"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/visuellverstehen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-07T10:29:23.000Z","updated_at":"2024-05-07T08:14:10.000Z","dependencies_parsed_at":"2024-02-23T17:30:45.705Z","dependency_job_id":"43ed2f13-2c9f-471d-92ee-446631b4c600","html_url":"https://github.com/visuellverstehen/t3meilisearch","commit_stats":{"total_commits":68,"total_committers":3,"mean_commits":"22.666666666666668","dds":"0.13235294117647056","last_synced_commit":"a0fcc8fce35927b3563cb31f8ca1e89920318006"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visuellverstehen%2Ft3meilisearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visuellverstehen%2Ft3meilisearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visuellverstehen%2Ft3meilisearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visuellverstehen%2Ft3meilisearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/visuellverstehen","download_url":"https://codeload.github.com/visuellverstehen/t3meilisearch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415963,"owners_count":20935388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["meilisearch","meilisearch-php","typo3","typo3-cms-extension"],"created_at":"2024-11-24T05:13:32.668Z","updated_at":"2025-04-10T04:38:21.921Z","avatar_url":"https://github.com/visuellverstehen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# t3meilisearch\n\n## Preparation\n\nInstall 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.\n\nYou will also need `poppler-utils` in order to index PDF files.\n\n## Installation\n\nYou can easily install the extension by using Composer:\n\n```bash\ncomposer require visuellverstehen/t3meilisearch\n```\n\nYou may have to activate the extension in TYPO3 10.4, but since TYPO3 11.5 this is not required anymore.\n\n## Configuration\n\nLog into TYPO3 as an admin or systemmaintainer and go to the settings module. Adjust the configure for t3meilisearch by setting the following fields:\n\n### Host\n\nThe address the Meilisearch server is reachable at. Optionaly including the port.\n\nExample:\n\n```\nhost=127.0.0.1:7700\n```\n\n### Api\n\nThe key to authenticate the requests\n\nExample:\n\n```\napiKey=masterKey\n```\n\n### Target page uid\n\nThe uid of the page where the main plugin lives (see [Usage](#usage)).\n\nExample:\n\n```\ntargetPid=56\n```\n\n### Index\n\nYou can define a custom index by replacing the default value provided by t3meilisearch.\n\nExample:\n\n```\nindex=content\n```\n\nThats pretty much it. The extension will then index pages and pdfs after they've been cached.\n\n\u003ca name=\"usage\"\u003e\u003c/a\u003e\n## Usage\n\nIt 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.\n\nYou 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:\n\n```html\n \u003cf:cObject typoscriptObjectPath=\"tt_content.list.20.t3meilisearch_pi2\" /\u003e\n```\n\n### Parsing content\n\nBy default everything inbetween `\u003cbody\u003e\u003c/body\u003e` 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.\n\n```html\n\u003c!-- INDEX_CONTENT_START --\u003e\n\u003cp\u003eThis content will be indexed\u003c/p\u003e\n\u003c!-- INDEX_CONTENT_STOP --\u003e\n\n\u003cp\u003eThis content will NOT be indexed\u003c/p\u003e\n```\n\n### Overriding templates\n\nBecause 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:\n\n```\nplugin.tx_t3meilisearch {\n    view {\n        templateRootPaths {\n            5000 = EXT:custom_extension/Resources/Private/Templates/\n        }\n        partialRootPaths {\n            5000 = EXT:custom_extension/Resources/Private/Partials/\n        }\n    }\n}\n```\n\nNext 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.\n\n### Exclude pages from indexing\n\nYou can disable the »Include in Search« checkbox when editing a page to prevent a page beeing indexed.\n\n### Dropping the index\n\nWant a clear start? You can simply execute a HTTP request to drop the index:\n\n```bash\ncurl -H 'Authorization: Bearer yourApiKey' -X DELETE 'http://localhost:7700/indexes/documents'\n```\n\nA new index with the name configured in `$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['t3meilisearch']['index']` will be created by t3meilisearch.\n\n### Removing specific documents\n\nWhen 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:\n\n```bash\ncurl -H 'Authorization: Bearer yourApiKey' -X DELETE 'http://localhost:7700/indexes/documents/documents/:id'\n```\n\n### Add sorting option\n\nBy default t3meilisearch sorts the results by crdate (filetime for PDFs) descending. You can add simple sorting options by adding a select:\n\n```html\n\u003cselect name=\"sorting\"\u003e\n    \u003coption selected disabled\u003eSorting\u003c/option\u003e\n    \u003coption value=\"crdate_desc\" {f:if(condition: '{queryParams.sorting} === \"crdate_desc\" || !{queryParams.sorting}', then: 'selected')}\u003eNew first\u003c/option\u003e\n    \u003coption value=\"crdate_asc\" {f:if(condition: '{queryParams.sorting} === \"crdate_asc\"', then: 'selected')}\u003eOld first\u003c/option\u003e\n\u003c/select\u003e\n```\n\nIt 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.\n\n### Add type filtering\n\nBy 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:\n\n```html\n\u003cinput class=\"filter__input\" type=\"checkbox\" id=\"type-page\" name=\"types[]\" value=\"page\" {f:if(condition: '\"page\" == {type}', then: 'checked') -\u003e f:for(each: '{queryParams.types}', as: 'type')}\u003e\n\u003clabel class=\"filter__label\" for=\"type-page\"\u003eAllgemein\u003c/label\u003e\n```\n\n---\n\nMeilisearch has an easy API to use: [docs.meilisearch.com](https://docs.meilisearch.com/reference/api/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisuellverstehen%2Ft3meilisearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvisuellverstehen%2Ft3meilisearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisuellverstehen%2Ft3meilisearch/lists"}