kaiwangleo opened a new pull request, #1011: URL: https://github.com/apache/flink-agents/pull/1011
Fixes #999\n\n## Root cause\nFiltered queryEmbedding requests applied the combined filter through SearchRequest.postFilter after Elasticsearch had already selected the unfiltered KNN top-k results. This could return fewer than k matching documents.\n\n## Fix\nApply the combined filter directly to the Elasticsearch KNN clause through KnnSearch.Builder.filter. Existing unified filters, raw filter_query handling, AND composition, k, num_candidates, and exception behavior are preserved.\n\n## Tests\n- WSL Maven compilation for the Elasticsearch module passed.\n- Real Elasticsearch 8.19 integration tests passed: 6 tests, 0 failures, 0 errors, 0 skipped.\n- Regression coverage includes unified filters, raw filter_query, combined filters, and matching documents outside the unfiltered top-k.\n- Spotless passed in a clean WSL working copy. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
