Skip to content

[LSP-1280] Add AutoSuggest API using OpenSearch#8

Merged
Bekhzod96 merged 37 commits intomainfrom
LSP-1280
Mar 3, 2026
Merged

[LSP-1280] Add AutoSuggest API using OpenSearch#8
Bekhzod96 merged 37 commits intomainfrom
LSP-1280

Conversation

@michael-puzon-resultscx
Copy link
Copy Markdown
Contributor

@michael-puzon-resultscx michael-puzon-resultscx commented Feb 16, 2026

Changes Done

This PR implements the AutoSuggest API endpoint utilizing OpenSearch. It introduces a new handler (osAutoSuggestHandler) and configures the /osautosuggest HTTP GET route in the Serverless framework. The endpoint leverages OpenSearch to provide autosuggest capabilities for search queries, improving user experience with real-time suggestions. Configuration and deployment details are updated in serverless.yml.

Copilot AI review requested due to automatic review settings February 16, 2026 07:33
@michael-puzon-resultscx michael-puzon-resultscx changed the title feat: add auto-suggest functionality with new handler and query builder [LSP-1280] Add AutoSuggest API using OpenSearch Feb 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an OpenSearch-backed autosuggest endpoint by introducing a dedicated query builder and wiring a new Serverless HTTP route/handler into the existing search API.

Changes:

  • Add buildAutoSuggestQuery to construct prefix/phrase-prefix autosuggest queries.
  • Add osAutoSuggestHandler Lambda handler to serve autosuggest results from OpenSearch.
  • Register new GET /osautosuggest route in serverless.yml.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/utils/esHelpers.js Introduces an autosuggest query builder used by the new endpoint.
src/handlers/osAutoSuggestHandler.js Adds a new Lambda handler that parses query params, executes OpenSearch search, and returns suggestions.
serverless.yml Wires the new autosuggest handler to an HTTP API route.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@hannahvarughese hannahvarughese left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@Bekhzod96 Bekhzod96 left a comment

Choose a reason for hiding this comment

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

Could you check why a lot of files which weren't changed and already on main still here is showing as new file

@Bekhzod96 Bekhzod96 merged commit 7d21cd4 into main Mar 3, 2026
1 check passed
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.

5 participants