Skip to content

fix: updated opensearch code inside flows to match Langflow#922

Merged
lucaseduoli merged 4 commits into
mainfrom
fix/opensearch-component
Feb 10, 2026
Merged

fix: updated opensearch code inside flows to match Langflow#922
lucaseduoli merged 4 commits into
mainfrom
fix/opensearch-component

Conversation

@lucaseduoli

Copy link
Copy Markdown
Collaborator

This pull request significantly enhances the OpenSearch multimodal vector store component by improving hybrid search capabilities, adding a new raw search tool, and strengthening error handling and logging. The changes also address known OpenSearch mapping issues and improve developer experience through clearer documentation and debug messages.

Major enhancements and fixes:

1. New features and API improvements

  • Added a raw_search method to allow direct execution of OpenSearch queries, with results cleaned of embedding vectors for readability. This method is now exposed as an output tool, making advanced querying more accessible.
  • Extended the component's description to clarify the usage of the new search tools and provide example queries, improving user guidance.

2. Robustness and error handling

  • Improved the embedding field mapping logic to check if the field already exists and matches the required dimensions, gracefully skipping updates if so. If a known OpenSearch k-NN plugin issue (NullPointerException) occurs, the component logs a warning and continues, avoiding crashes. [1] [2] [3]

3. Logging and developer experience

  • Standardized and clarified debug and info log messages throughout the ingestion and client-building processes, making it easier to trace and debug component behavior. [1] [2] [3] [4] [5] [6]

4. Documentation and maintainability

  • Added and updated docstrings and in-line comments to clarify method purposes and document known issues, increasing maintainability and onboarding speed for new developers.

5. Refactoring and code cleanup

  • Refactored imports for better readability and maintainability. Removed unused decorators and reorganized input/output definitions. [1] [2]

These changes collectively make the OpenSearch multimodal component more robust, user-friendly, and easier to extend or debug.

@edwinjosechittilappilly

Copy link
Copy Markdown
Collaborator

closes #875

@edwinjosechittilappilly edwinjosechittilappilly linked an issue Feb 9, 2026 that may be closed by this pull request
2 tasks

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

approving to run the integration tests. Code LGTM

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Holding this PR awaiting integration test fix for JSON.

@lucaseduoli Let me createa quick fix.

@edwinjosechittilappilly

Copy link
Copy Markdown
Collaborator

#932

@edwinjosechittilappilly

Copy link
Copy Markdown
Collaborator

awaiting integration tests results

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, Awaiting the integration tests to pass

@lucaseduoli lucaseduoli merged commit 14c133f into main Feb 10, 2026
4 checks 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.

[Bug]: Update Flows with the latest OpenSearch Component [Bug]: [LF] Update opensearch component with error handling for index creation

2 participants