{"id":17328347,"url":"https://github.com/dadoonet/legacy-search","last_synced_at":"2025-04-15T22:19:03.997Z","repository":{"id":16704396,"uuid":"19461142","full_name":"dadoonet/legacy-search","owner":"dadoonet","description":"Demo project showing how to add elasticsearch to a legacy application.","archived":false,"fork":false,"pushed_at":"2024-09-27T04:31:05.000Z","size":1218,"stargazers_count":113,"open_issues_count":6,"forks_count":44,"subscribers_count":10,"default_branch":"00-legacy","last_synced_at":"2025-03-29T02:03:51.096Z","etag":null,"topics":["demo","elasticsearch","nosql","sql"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/dadoonet.png","metadata":{"files":{"readme":"README.markdown","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":"2014-05-05T15:43:20.000Z","updated_at":"2025-02-19T08:28:22.000Z","dependencies_parsed_at":"2024-06-27T22:22:17.374Z","dependency_job_id":"cccc4a65-6c9d-4097-b178-0c959498664b","html_url":"https://github.com/dadoonet/legacy-search","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadoonet%2Flegacy-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadoonet%2Flegacy-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadoonet%2Flegacy-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadoonet%2Flegacy-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dadoonet","download_url":"https://codeload.github.com/dadoonet/legacy-search/tar.gz/refs/heads/00-legacy","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249161464,"owners_count":21222486,"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":["demo","elasticsearch","nosql","sql"],"created_at":"2024-10-15T14:23:36.945Z","updated_at":"2025-04-15T22:19:03.978Z","avatar_url":"https://github.com/dadoonet.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Add Search to Legacy Application\n================================\n\nIntroduction\n------------\n\nThis is a demo project to show how to add elasticsearch to a legacy SQL project.\n\nIn this branch, you will find the current legacy version of the project.\n\n\nInstallation\n------------\n\nYou need to have:\n\n* Maven\n* JDK8 or higher\n* Docker\n\nRun MySQL database using docker with:\n\n```shell\n./mysql.sh\n```\n\nBuild the application:\n\n```sh\nmvn clean install\n```\n\nThen run it with:\n\n```\njava -jar target/legacy-search-8.0-SNAPSHOT.jar\n```\n\nOr directly run from Maven:\n\n```sh\nmvn clean spring-boot:run\n```\n\nNote that while developing, you would probably prefer running `LegacySearchApp#main()`\nfrom your IDE to get hot reload of the application.\n\nPlay!\n-----\n\n### Some CRUD operations\n\n```sh\n# Create one person\ncurl -XPUT http://127.0.0.1:8080/api/1/person/1 -H \"Content-Type: application/json\" -d '{\"name\":\"David Pilato\"}'\n\n# Read that person\ncurl http://127.0.0.1:8080/api/1/person/1\n\n# Update full document\ncurl -XPUT http://127.0.0.1:8080/api/1/person/1 -H \"Content-Type: application/json\" -d '{\"name\":\"David Pilato\", \"children\":3}'\n\n# Check\ncurl http://127.0.0.1:8080/api/1/person/1\n\n# Delete\ncurl -XDELETE http://127.0.0.1:8080/api/1/person/1\n\n# Check (you should get a 404 error)\ncurl http://127.0.0.1:8080/api/1/person/1\n```\n\n### Database Initialisation\n\n```sh\n# Initialize the database with 1 000 (default) or 10 000 persons\ncurl http://127.0.0.1:8080/api/1/person/_init\ncurl http://127.0.0.1:8080/api/1/person/_init?size=10000\n```\n\n## Search\n\n```sh\n# Search for something (`a la google`)\ncurl \"http://127.0.0.1:8080/api/1/person/_search?q=Joe\"\n```\n\nYou can then access the application using your browser: [http://127.0.0.1:8080/](http://127.0.0.1:8080/).\nYou can also look at [advanced search](http://127.0.0.1:8080/#/advanced).\n\nNext step\n---------\n\nLook at [branch 01-direct](https://github.com/dadoonet/legacy-search/tree/01-direct)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdadoonet%2Flegacy-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdadoonet%2Flegacy-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdadoonet%2Flegacy-search/lists"}