Skip to content

Comments

implemented elastic search setup#128

Open
chiscookeke11 wants to merge 3 commits intoDogStark:mainfrom
chiscookeke11:issue-#91
Open

implemented elastic search setup#128
chiscookeke11 wants to merge 3 commits intoDogStark:mainfrom
chiscookeke11:issue-#91

Conversation

@chiscookeke11
Copy link

@chiscookeke11 chiscookeke11 commented Feb 22, 2026

Description

This PR integrates Elasticsearch into the PetChain platform to provide high-performance, full-text search capabilities across pets, vets, and medical records. It moves search logic from basic database queries to a dedicated search engine, enabling advanced features like relevance scoring, geolocation-aware results, and real-time autocomplete.

Related Issues

closes #91

Changes Made - [ ]

  • Elasticsearch Client Initialization: Created a singleton client in lib/elasticsearch.ts for efficient connection management.
  • Unified Search API: Implemented POST /api/v1/search supporting:
  • Relevance Scoring: Multi-match queries with field boosting (e.g., name^3).
  • Geolocation: geo_distance filtering based on user coordinates.
  • Faceted Search: Aggregations for breed, specialty, and status.

Screenshots (if applicable)

Checklist

  • My code follows the project's coding style.
  • I have tested these changes locally.
  • Documentation has been updated where necessary.

Copy link
Collaborator

@llinsss llinsss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove package-lock.json

@chiscookeke11
Copy link
Author

remove package-lock.json

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Elasticsearch Integration

2 participants