Skip to content

fix: chat filter#1280

Merged
edwinjosechittilappilly merged 5 commits into
mainfrom
fix-chat-filter
Mar 27, 2026
Merged

fix: chat filter#1280
edwinjosechittilappilly merged 5 commits into
mainfrom
fix-chat-filter

Conversation

@Wallgau

@Wallgau Wallgau commented Mar 26, 2026

Copy link
Copy Markdown
Collaborator

This pull request removes the OpenSearch filter merge utility and its related test suite from the codebase. These utilities were previously used to merge chat/knowledge filter clauses into OpenSearch search request bodies, but are no longer needed in this repository. The Dockerfile is also updated to stop copying the OpenRAG utils source directory and setting the PYTHONPATH environment variable.

The most important changes are:

Removal of OpenSearch filter merge utilities:

Deleted the src/utils/opensearch_filter_merge.py file, which contained all logic for merging chat filter expressions, applying limits, and integrating filters into OpenSearch request bodies.
Removed the corresponding test suite tests/unit/test_opensearch_filter_merge.py, which included comprehensive unit tests for the filter merge utilities.
Dockerfile update:

Updated Dockerfile.langflow to stop copying the OpenRAG utils source (src) into the image and removed the PYTHONPATH environment variable, since the OpenSearch filter merge code is no longer present or required.

Parse and apply the component's filter_expression (same JSON parsing as search()) when handling raw_search queries in the multimodal multi-embedding OpenSearch component. The change: - JSON-decode filter_expression and raise a ValueError on parse errors. - Coerce filter object into ES filter clauses via _coerce_filter_clauses and wrap the existing query into a bool query with those filter clauses (or use match_all if no original query). - If a filter object is present, apply its limit to query_body.size when not already set, and map score_threshold / scoreThreshold to query_body.min_score if not already set and > 0. This ensures consistent filtering, sizing, and min_score behavior for raw_search like the search() path.
Change the default value of the auth_mode DropdownInput from 'basic' to 'jwt' in OpenSearchVectorStoreComponentMultimodalMultiEmbedding (flows/components/opensearch_multimodal.py). This makes JWT the default authentication method while keeping the available options ['basic', 'jwt'].
@github-actions github-actions Bot added the bug 🔴 Something isn't working. label Mar 26, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 26, 2026
@Wallgau Wallgau marked this pull request as ready for review March 26, 2026 20:01

@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.

Please set brearer prefix as false as per last discussions

@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

@edwinjosechittilappilly edwinjosechittilappilly merged commit d31b019 into main Mar 27, 2026
11 checks passed
@github-actions github-actions Bot added the lgtm label Mar 27, 2026
@github-actions github-actions Bot deleted the fix-chat-filter branch March 27, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🔴 Something isn't working. lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants