{"id":19817000,"url":"https://github.com/geoadmin/service-search-sphinx","last_synced_at":"2026-02-04T09:26:59.922Z","repository":{"id":10203274,"uuid":"12296583","full_name":"geoadmin/service-search-sphinx","owner":"geoadmin","description":"Sphinx Search service for RE3","archived":false,"fork":false,"pushed_at":"2025-04-02T14:19:35.000Z","size":1370,"stargazers_count":7,"open_issues_count":2,"forks_count":6,"subscribers_count":25,"default_branch":"develop-2025-05-14","last_synced_at":"2025-04-02T14:27:15.846Z","etag":null,"topics":["managed-by-tf","re3","service-search"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geoadmin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2013-08-22T12:40:38.000Z","updated_at":"2025-03-26T08:47:51.000Z","dependencies_parsed_at":"2023-02-17T19:15:28.791Z","dependency_job_id":"b3e52aee-0eef-4b76-9889-d0cc8294ea84","html_url":"https://github.com/geoadmin/service-search-sphinx","commit_stats":null,"previous_names":["geoadmin/service-search-sphinx"],"tags_count":99,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Fservice-search-sphinx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Fservice-search-sphinx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Fservice-search-sphinx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Fservice-search-sphinx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geoadmin","download_url":"https://codeload.github.com/geoadmin/service-search-sphinx/tar.gz/refs/heads/develop-2025-05-14","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251860617,"owners_count":21655774,"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":["managed-by-tf","re3","service-search"],"created_at":"2024-11-12T10:11:24.316Z","updated_at":"2026-02-04T09:26:54.885Z","avatar_url":"https://github.com/geoadmin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"service-sphinxsearch\n====================\n\nSphinx Search service for RE3\n---------------------------------------------------\n\n### SPHINX doc (2.2.11):\n\n- http://sphinxsearch.com/docs/\n- http://sphinxsearch.com/docs/current.html\n- http://sphinxsearch.com/docs/archives/2.1.5/\n\n### Setup\nThe fsdi sphinxsearch consists of the following services:\n* [service-search-wsgi](https://github.com/geoadmin/service-search-wsgi) (port 80)\n* [service-sphinxsearch](https://github.com/geoadmin/service-sphinxsearch) (port 9312)\n\nThe service configuration is in this [docker-compose](https://github.com/geoadmin/infra-vhost/blob/master/systems/api3/service-search/base/docker-compose.yml) file:\n\n### service-search-wsgi adresses\n\nStaging          | URL\n-----------------|------------------------------------------|\n**Dev:**         | https://sys-api3.dev.bgdi.ch/rest/services/api/SearchServer  |\n**Int:**         | https://sys-api3.int.bgdi.ch/rest/services/api/SearchServer  |\n**Prod:**        | https://api.geo.admin.ch/rest/services/api/SearchServer |\n\n### service-sphinxsearch container setup\n\nThe sphinxsearch container/image can be operated in\n* **maintenance mode** (index creation / update)\n* **service mode** (sphinxsearch service on port 9312)\n\n### Service paths inside the running container\n\nObject            | Path\n------------------|-----------------------------------|\n**PID:**          | /var/run/sphinxsearch/searchd.pid |\n**Searchd Log**   | /var/log/sphinxsearch/searchd.log |\n**Query Log:**    | /var/log/sphinxsearch/query.log   |\n**Indexes:**      | /var/lib/sphinxsearch/data/index/ |\n**Configuration:**| /etc/sphinxsearch/sphinx.conf     |\n\n### maintenance mode\n#### local index config validation\n```bash\nmake check-config-local\n```\nThis check is automatically executed with Codebuild for each Pull request.\n\n#### local index creation\n```bash\nSTAGING=dev DB=bod_dev make pg2sphinx\n```\nFor this command you need read-write access to `${SPHINX_EFS}`.\nThis command is executed/triggered by the database deploy script on `geodatasync.prod.bgdi.ch`.\n\n### service mode\n#### local sphinxsearch server\nYou can run a local sphinxsearch server on port 9312 with the following make targets:\n```bash\nmake dockerrun\nmake dockerrundebug\n```\n\nthe initial start of this local container will copy all the index files from the efs folder to a local docker volume. This initial ramp up process can take up to an hour! You will need at least **70 GB of free diskspace** on your host.\n\nIn the running service container, the indexes are synced every 15 minutes from efs to the local volume and rotated. This is done with the script index-sync-rotate.sh.\n\nThe sphinxsearch logs (searchd and query logs) and the index-sync-rotate.sh logs are redirected to stdout inside the container and are visible with `docker logs`.\n\n### Deploy\nSince the service is operated on vhosts, the deploy of the search stack (service-search-wsgi and service-sphinxsearch) is done with this [deploy script](https://github.com/geoadmin/infra-vhost/blob/master/deploy.sh).\n\nSee [here](https://github.com/geoadmin/doc-guidelines/blob/master/DEPLOY.md#1-sphinx-search---int) for more information.\n\n### Wordform\n\nWordforms are part of the sphinx conf.\nThe swisssearch index (zipcodes) has to be computed after a wordforms update.\n\n### Command line debugging with python sphinx api\n```bash\ncd test\npython test.py -h localhost -p 9312 -i swisssearch \"birgmattenweg 5\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoadmin%2Fservice-search-sphinx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeoadmin%2Fservice-search-sphinx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoadmin%2Fservice-search-sphinx/lists"}