{"id":13593571,"url":"https://github.com/cweiske/phinde","last_synced_at":"2025-04-14T08:31:53.150Z","repository":{"id":66261023,"uuid":"51217821","full_name":"cweiske/phinde","owner":"cweiske","description":"Self-hosted search engine for your static blog","archived":false,"fork":false,"pushed_at":"2023-04-21T19:40:26.000Z","size":185,"stargazers_count":56,"open_issues_count":8,"forks_count":3,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-27T22:04:56.133Z","etag":null,"topics":["indieweb","php","search-engine"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cweiske.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2016-02-06T19:28:24.000Z","updated_at":"2024-09-24T22:09:47.000Z","dependencies_parsed_at":"2024-01-16T22:17:54.694Z","dependency_job_id":"12a9dba1-f180-46e9-b2e9-27097650504a","html_url":"https://github.com/cweiske/phinde","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweiske%2Fphinde","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweiske%2Fphinde/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweiske%2Fphinde/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweiske%2Fphinde/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cweiske","download_url":"https://codeload.github.com/cweiske/phinde/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248845732,"owners_count":21170840,"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":["indieweb","php","search-engine"],"created_at":"2024-08-01T16:01:21.681Z","updated_at":"2025-04-14T08:31:53.086Z","avatar_url":"https://github.com/cweiske.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"**********************************\nphinde - generic web search engine\n**********************************\nSelf-hosted search engine you can use for your static blog or about\nany other website you want search functionality for.\n\nMy live instance is at http://search.cweiske.de/ and indexes my\nwebsite, blog and all linked URLs.\n\n\n========\nFeatures\n========\n- Crawler and indexer with the ability to run many in parallel\n- Shows and highlights text that contains search words\n- Boolean search queries:\n\n  - ``foo bar`` searches for ``foo AND bar``\n  - ``foo OR bar``\n  - ``title:foo`` searches for ``foo`` only in the page title\n- Facets for tag, domain, language and type\n- Date search:\n\n  - ``before:2016-08-30`` - modification date before that day\n  - ``after:2016-08-30`` - modified after that day\n  - ``date::2016-08-30`` - exact modification day match\n- Site search\n\n  - Query: ``foo bar site:example.org/dir/``\n  - or use the ``site`` GET parameter:\n    ``/?q=foo\u0026site=example.org/dir``\n- OpenSearch support with HTML and Atom result lists\n- Instant indexing with WebSub (formerly PubSubHubbub)\n\n\n============\nDependencies\n============\n- PHP 8.x\n- Elasticsearch 2.0\n- MySQL or MariaDB for WebSub subscriptions\n- Gearman (Debian 9: ``gearman-job-server``, not ``gearman-server``)\n- ``gearadmin`` command line tool (``gearman-tools`` package)\n- PHP Gearman extension\n- Some PHP libraries that get installed with composer\n\n\n=====\nSetup\n=====\n#. Install and run Elasticsearch and Gearman\n#. Install ``php-gearman`` and ``gearman-tools``\n#. Get a local copy of the code::\n\n     $ git clone https://git.cweiske.de/phinde.git phinde\n\n#. Install dependencies via composer::\n\n     $ composer install --no-dev\n\n#. Point your webserver's document root to phinde's ``www`` directory\n#. Copy ``data/config.php.dist`` to ``data/config.php`` and adjust it.\n   Make sure your add your domain to the crawl whitelist.\n#. Create a MySQL database and import the schema from ``data/schema.sql``\n#. Run ``bin/setup.php`` which sets up the Elasticsearch schema\n#. Put your homepage into the queue::\n\n     $ ./bin/process.php http://example.org/\n\n#. Start at least one worker to process the crawl+index queue::\n\n     $ ./bin/phinde-worker.php\n\n#. Check phinde's status page in your browser.\n   The number of open tasks should be \u003e 0, the number of workers also.\n\n\nRe-index when your site changes\n===============================\nWhen your site changed, the search engine needs to re-crawl and re-index\nthe pages.\n\nSimply tell phinde that something changed by running::\n\n    $ ./bin/process.php http://example.org/foo.htm\n\nphinde supports HTML pages and Atom feeds, so if your blog has a feed\nit's enough to let phinde reindex that one.\nIt will find all linked pages automatically.\n\n\nWebsite integration\n===================\nAdding a simple search form to your website is easy.\nIt needs two things:\n\n- ``\u003cform\u003e`` tag with an action that points to the phinde instance\n- Search text field with name of ``q``.\n\nExample::\n\n  \u003cform method=\"get\" action=\"http://phinde.example.org\"\u003e\n    \u003cinput type=\"text\" name=\"q\" placeholder=\"Search text\"/\u003e\n    \u003cbutton type=\"submit\"\u003eSearch\u003c/button\u003e\n  \u003c/form\u003e\n\n\nSystem service\n==============\nWhen using systemd, you can let it run multiple worker instances when\nthe system boots up:\n\n#. Copy files ``data/systemd/phinde*.service`` into ``/etc/systemd/system/``\n#. Adjust user and group names, and the work directories\n#. Enable three worker processes::\n\n     $ systemctl daemon-reload\n     $ systemctl enable phinde@1\n     $ systemctl enable phinde@2\n     $ systemctl enable phinde@3\n     $ systemctl enable phinde\n     $ systemctl start phinde\n#. Now three workers are running. Restarting the ``phinde`` service also\n   restarts the workers.\n\n\n\nCron job\n========\nRun ``bin/renew-subscriptions.php`` once a day with cron.\nIt will renew the WebSub subscriptions.\n\n\n=====\nHowto\n=====\n\nDelete index data from one domain::\n\n    $ curl -iv -XDELETE -H 'Content-Type: application/json' -d '{\"query\":{\"term\":{\"domain\":\"example.org\"}}}' http://127.0.0.1:9200/phinde/_query\n\nThat's delete-by-query 2.0, see\nhttps://www.elastic.co/guide/en/elasticsearch/plugins/2.0/delete-by-query-usage.html\n\n\nSubscribe to a website/feed\n===========================\nPhinde supports WebSub__ to get subscribe to changes of a website.\nWhen phinde gets notified by the website's hub about changes,\nit will immediately crawl and index the changed pages.\n\nSubscribe to a website's feed::\n\n    $ php bin/subscribe.php http://example.org/feed.atom\n\nPhinde will determine the website's hub and send a registration request to it.\n\nThe status page will show the number of working, and the number of open\nsubscriptions.\n\nUnsubscribing also happens on command line::\n\n    $ php bin/unsubscribe.php http://example.org/feed.atom\n\n__ https://www.w3.org/TR/websub/\n\n============\nAbout phinde\n============\n\nSource code\n===========\nphinde's source code is available from http://git.cweiske.de/phinde.git\nor the `mirror on github`__.\n\n__ https://github.com/cweiske/phinde\n\n\nLicense\n=======\nphinde is licensed under the `AGPL v3 or later`__.\n\n__ http://www.gnu.org/licenses/agpl.html\n\n\nAuthor\n======\nphinde was written by `Christian Weiske`__.\n\n__ http://cweiske.de/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcweiske%2Fphinde","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcweiske%2Fphinde","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcweiske%2Fphinde/lists"}