Skip to content

feat: change default fuzziness from AUTO to 0 in OpenSearch retrievers#3198

Open
SyedShahmeerAli12 wants to merge 1 commit intodeepset-ai:mainfrom
SyedShahmeerAli12:fix/opensearch-fuzziness-default-off
Open

feat: change default fuzziness from AUTO to 0 in OpenSearch retrievers#3198
SyedShahmeerAli12 wants to merge 1 commit intodeepset-ai:mainfrom
SyedShahmeerAli12:fix/opensearch-fuzziness-default-off

Conversation

@SyedShahmeerAli12
Copy link
Copy Markdown
Contributor

Summary

Closes #3187

  • fuzziness="AUTO" was causing severe performance regressions on large indexes — search times going from 30s → 6s when turned off
  • Changed the default from "AUTO" to 0 (exact matching) in:
    • OpenSearchBM25Retriever
    • OpenSearchHybridRetriever
    • OpenSearchDocumentStore._bm25_retrieval / _bm25_retrieval_async
  • Users who need fuzzy matching can still pass fuzziness="AUTO" explicitly — no functionality removed, just the default changes

Test plan

  • All 143 unit tests pass
  • Updated to_dict serialization tests to reflect new default
  • Updated run() call assertion tests to reflect new default
  • from_dict tests that explicitly pass "AUTO" are unchanged (backward compat with old serialized configs)

@SyedShahmeerAli12 SyedShahmeerAli12 requested a review from a team as a code owner April 21, 2026 19:42
@SyedShahmeerAli12 SyedShahmeerAli12 requested review from julian-risch and removed request for a team April 21, 2026 19:42
@github-actions
Copy link
Copy Markdown
Contributor

Coverage report (amazon_bedrock)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  integrations/amazon_bedrock/src/haystack_integrations/components/generators/amazon_bedrock/chat
  utils.py
Project Total  

This report was generated by python-coverage-comment-action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Coverage report (opensearch)

This PR does not seem to contain any modification to coverable code.

@sjrl
Copy link
Copy Markdown
Contributor

sjrl commented Apr 22, 2026

Hey @SyedShahmeerAli12 you also touched amazon bedrock files which are unrelated to your PR, please remove them.

fuzziness="AUTO" was causing severe performance regressions (30s → 6s
search times) for large indexes. Switching the default to 0 (exact
matching) avoids the clause explosion that AUTO triggers on big corpora.
Users who need fuzzy matching can still pass fuzziness="AUTO" explicitly.

Closes deepset-ai#3187
@SyedShahmeerAli12 SyedShahmeerAli12 force-pushed the fix/opensearch-fuzziness-default-off branch from 5d72bf0 to 5c62c73 Compare April 22, 2026 11:10
@SyedShahmeerAli12
Copy link
Copy Markdown
Contributor Author

@sjrl removed the Amazon Bedrock files, the PR now only contains the OpenSearch fuzziness changes.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Turn fuzziness off by default in Open Search integration

2 participants