{"id":19774373,"url":"https://github.com/wpperformance/wp-performance-meilisearch","last_synced_at":"2026-05-18T03:02:49.568Z","repository":{"id":171049973,"uuid":"624569812","full_name":"wpperformance/wp-performance-meilisearch","owner":"wpperformance","description":"Meilisearch implementation for WordPress","archived":false,"fork":false,"pushed_at":"2023-04-06T19:07:43.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-07T14:41:19.717Z","etag":null,"topics":["meilisearch","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpperformance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-04-06T19:07:25.000Z","updated_at":"2023-07-09T22:43:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3a0e603-c93c-474c-9550-b68ae5cedd5c","html_url":"https://github.com/wpperformance/wp-performance-meilisearch","commit_stats":null,"previous_names":["wp-performance/wp-performance-meilisearch","wpperformance/wp-performance-meilisearch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wpperformance/wp-performance-meilisearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpperformance%2Fwp-performance-meilisearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpperformance%2Fwp-performance-meilisearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpperformance%2Fwp-performance-meilisearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpperformance%2Fwp-performance-meilisearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpperformance","download_url":"https://codeload.github.com/wpperformance/wp-performance-meilisearch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpperformance%2Fwp-performance-meilisearch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33163413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","wordpress"],"created_at":"2024-11-12T05:12:46.411Z","updated_at":"2026-05-18T03:02:49.533Z","avatar_url":"https://github.com/wpperformance.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meilisearch implementation for WordPress\n\n## WP-CLI\n\nThis plugin add a wp-cli command for save all post\n\n```\nwp meilisearch reindex_post\n```\n\n## update filterable fields\n\n```\nwp meilisearch update_filterable\n```\n\n## Hook\n\nUpdate index of meilisearch when a post has added, updated or deleted\n\n## Config\n\nAdd in wp-config.php :\n\n```\ndefine('MEILISEARCH_URL', 'XXX');\ndefine('MEILISEARCH_KEY_PUBLIC', 'XXX');\ndefine('MEILISEARCH_KEY_SECRET', 'XXX');\n\n```\n\n## JS\n\n```\nnpm add @meilisearch/instant-meilisearch instantsearch.js\n```\n\nThe vars `MEILISEARCH_URL`, `MEILISEARCH_KEY_PUBLIC` and `MEILISEARCH_APP_INDEX` are shared across the page for use in javascript script.\n\nExample of use :\n\n```html\n\u003cdiv id=\"searchbox\"\u003e\u003c/div\u003e\n\u003cdiv id=\"hits\"\u003e\u003c/div\u003e\n\u003cdiv id=\"tags-list\"\u003e\u003c/div\u003e\n```\nor pattern\n```html\n\u003c!-- wp:group {\"layout\":{\"type\":\"constrained\"}} --\u003e\n\u003cdiv class=\"wp-block-group\"\u003e\u003c!-- wp:group {\"anchor\":\"searchbox\",\"layout\":{\"type\":\"constrained\",\"className\": \"wp-search-algolia\"}} --\u003e\n  \u003cdiv id=\"searchbox\" class=\"wp-block-group\"\u003e\u003c/div\u003e\n  \u003c!-- /wp:group --\u003e\n\n  \u003c!-- wp:group {\"anchor\":\"tag-list\",\"layout\":{\"type\":\"constrained\", \"className\": \"tag-list\"}} --\u003e\n  \u003cdiv id=\"tag-list\" class=\"wp-block-group\"\u003e\u003c/div\u003e\n  \u003c!-- /wp:group --\u003e\n\n  \u003c!-- wp:group {\"anchor\":\"hits\",\"layout\":{\"type\":\"constrained\", \"className\": \"search-hits\"}} --\u003e\n  \u003cdiv id=\"hits\" class=\"wp-block-group\"\u003e\u003c/div\u003e\n  \u003c!-- /wp:group --\u003e\n\u003c/div\u003e\n\u003c!-- /wp:group --\u003e\n```\n\n\n```js\nimport { instantMeiliSearch } from '@meilisearch/instant-meilisearch'\nimport instantsearch from 'instantsearch.js'\nimport { searchBox, hits, refinementList } from 'instantsearch.js/es/widgets'\n\nconst initSearch = () =\u003e {\n  const search = instantsearch({\n    indexName: MEILISEARCH_APP_INDEX,\n    numberLocale: 'fr',\n    searchClient: instantMeiliSearch(MEILISEARCH_URL, MEILISEARCH_KEY_PUBLIC),\n    searchFunction(helper) {\n      // Ensure we only trigger a search when there's a query\n      if (helper.state.query \u0026\u0026 helper.state.query !== '') {\n        document.getElementById('hits').removeAttribute('hidden')\n        helper.search()\n      } else {\n        document.getElementById('hits').setAttribute('hidden', true)\n      }\n    },\n  })\n\n  search.addWidgets([\n    searchBox({\n      container: '#searchbox',\n    }),\n    refinementList({\n      container: '#tag-list',\n      attribute: 'tags',\n      limit: 5,\n      showMore: true,\n    }),\n    hits({\n      container: '#hits',\n      templates: {\n        item: `\n      \u003carticle\u003e\n        \u003ca href=\"{{ url }}\"\u003e\n          \u003cstrong\u003e\n            {{#helpers.highlight}}\n              { \"attribute\": \"title\", \"highlightedTagName\": \"mark\" }\n            {{/helpers.highlight}}\n          \u003c/strong\u003e\n        \u003c/a\u003e\n        {{#content}}\n          \u003cp\u003e{{#helpers.highlight}}{ \"attribute\": \"excerpt\", \"highlightedTagName\": \"mark\" }{{/helpers.highlight}}\u003c/p\u003e\n        {{/content}}\n      \u003c/article\u003e\n    `,\n      },\n    }),\n  ])\n\n  search.start()\n}\n\nexport default initSearch\n```\n\n## Doc\n\n- [https://github.com/meilisearch/instant-meilisearch](https://github.com/meilisearch/instant-meilisearch)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpperformance%2Fwp-performance-meilisearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpperformance%2Fwp-performance-meilisearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpperformance%2Fwp-performance-meilisearch/lists"}