{"id":28744821,"url":"https://github.com/aronno1920/elasticpracticesolution","last_synced_at":"2025-07-13T18:33:59.069Z","repository":{"id":298454584,"uuid":"997746561","full_name":"Aronno1920/ElasticPracticeSolution","owner":"Aronno1920","description":"Integrating Elasticsearch into a .NET Core 9 WebAPI project involves several key steps, including installing the required packages, configuring the client, indexing data, and querying Elasticsearch.","archived":false,"fork":false,"pushed_at":"2025-06-19T15:59:21.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-19T16:44:58.972Z","etag":null,"topics":["docker","docker-image","elasticsearch","elasticsearch-client","elasticsearchdocker","elasticstack","netcore","netcore9","practice"],"latest_commit_sha":null,"homepage":"","language":"C#","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/Aronno1920.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,"zenodo":null}},"created_at":"2025-06-07T05:04:16.000Z","updated_at":"2025-06-19T15:59:24.000Z","dependencies_parsed_at":"2025-06-11T07:41:48.044Z","dependency_job_id":"ff983991-9564-4dc4-b50f-7297d7703954","html_url":"https://github.com/Aronno1920/ElasticPracticeSolution","commit_stats":null,"previous_names":["aronno1920/elasticpracticesolution"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aronno1920/ElasticPracticeSolution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aronno1920%2FElasticPracticeSolution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aronno1920%2FElasticPracticeSolution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aronno1920%2FElasticPracticeSolution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aronno1920%2FElasticPracticeSolution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aronno1920","download_url":"https://codeload.github.com/Aronno1920/ElasticPracticeSolution/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aronno1920%2FElasticPracticeSolution/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265186830,"owners_count":23724753,"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":["docker","docker-image","elasticsearch","elasticsearch-client","elasticsearchdocker","elasticstack","netcore","netcore9","practice"],"created_at":"2025-06-16T12:07:57.802Z","updated_at":"2025-07-13T18:33:59.043Z","avatar_url":"https://github.com/Aronno1920.png","language":"C#","readme":"# PracticeApi\n\nA .NET 9 Web API for managing and searching products, featuring SQL Server and Elasticsearch integration.\n\n## Features\n\n- **CRUD operations** for products (Create, Read, Update, Delete)\n- **Search products** using:\n  - Entity Framework (SQL Server)\n  - Elasticsearch (full-text search)\n- **Automatic product seeding** (200,000+ fake products on first run)\n- **Response time middleware** for performance tracking\n- **Swagger/OpenAPI** documentation\n\n## Technologies\n\n- ASP.NET Core (.NET 9)\n- Entity Framework Core (SQL Server)\n- Elasticsearch (via NEST)\n- Bogus (data seeding)\n- Swagger (API docs)\n\n## Getting Started\n\n### Prerequisites\n\n- [.NET 9 SDK](https://dotnet.microsoft.com/download)\n- [SQL Server](https://www.microsoft.com/en-us/sql-server)\n- [Elasticsearch](https://www.elastic.co/downloads/elasticsearch) (default: `http://localhost:9200`)\n\n### Configuration\n\nEdit `PracticeApi/appsettings.json` to set your SQL Server connection string:\n\"ConnectionStrings\": { \"DefaultConnection\": \"Server=localhost;Database=SalesDB;User Id=sa;Password=abc@123;TrustServerCertificate=True;\" }\n\n\n### Running the API\n\n1. Restore dependencies: `dotnet restore`\n2. Build and run the project: `dotnet run --project PracticeApi`\n3. The API will automatically:\n- `Apply database migrations`\n- `Seed the database with products (if empty)`\n- `Sync products to Elasticsearch`\n\n4. Access Swagger UI at: `https://localhost:5001/swagger`\n\n## API Endpoints\n\n- `POST /api/products/create` - Create a product\n- `PUT /api/products/update/{id}` - Update a product\n- `DELETE /api/products/delete/{id}` - Delete a product\n- `GET /api/products/getbyid/{id}` - Get product by ID\n- `GET /api/products/getall` - List all products\n- `GET /api/products/searchef?query=...` - Search products (SQL)\n- `GET /api/products/searches?query=...` - Search products (Elasticsearch)\n\n## License\n\nThis project is provided for educational purposes.\n\nSummary of content:\n•\tDescribes the project, features, and tech stack.\n•\tProvides setup, configuration, and run instructions.\n•\tLists main API endpoints.\n•\tNotes on licensing and usage.\nLet me know if you want to add usage examples or further details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faronno1920%2Felasticpracticesolution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faronno1920%2Felasticpracticesolution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faronno1920%2Felasticpracticesolution/lists"}