Skip to content

feat(gooddata-sdk): [AUTO] add enable_hybrid_search param to search_ai()#1443

Closed
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P016-enable-hybrid-search
Closed

feat(gooddata-sdk): [AUTO] add enable_hybrid_search param to search_ai()#1443
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P016-enable-hybrid-search

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Adds enable_hybrid_search parameter to the search_ai() SDK wrapper method, surfacing the hybrid search capability introduced by GDAI-1349 in the gdc-nas backend.

P016 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/23194184862

Caution

Test fixtures need recording. The following fixture files are referenced by tests but do not exist yet.
They must be recorded against a live GoodData server before merging:

  • packages/gooddata-sdk/tests/compute/fixtures/ai_search.yaml
  • packages/gooddata-sdk/tests/compute/fixtures/ai_search_full_params.yaml

What changed in gdc-nas

Commit 64b778a (merged via PR #20454) added enableHybridSearch (boolean, default false) to the SearchRequest model across:

  • afm-exec-api OpenAPI spec (open-api-spec.json)
  • Kotlin model (Search.kt) and processor (GenAIProcessor.kt)
  • gRPC proto (gen_ai.proto — field enable_hybrid_search = 16)
  • Python gen-ai service (search_service.py, object_repository.py, qdrant_object_repository.py)

When enabled, the feature uses Qdrant Prefetch + FusionQuery (RRF) combining substring match on title and vector embedding search instead of pure vector search.

The gooddata-api-client was already regenerated and both model/search_request.py and models/search_request.py already expose enable_hybrid_search: Optional[StrictBool] = Field(default=False, alias='enableHybridSearch').

What was implemented in SDK

Added enable_hybrid_search: bool | None = None to the search_ai() method signature in compute/service.py, following the same conditional-kwargs pattern used by other optional parameters (deep_search, limit, etc.). Updated the full-params integration test to pass enable_hybrid_search=True.

Files modified

  • packages/gooddata-sdk/src/gooddata_sdk/compute/service.py
  • packages/gooddata-sdk/tests/compute/test_compute_service.py

JIRA: PENDING (Jira ticket will be created after review)
Risk: Low

Expose the `enable_hybrid_search` boolean parameter in the `search_ai()`
wrapper method so SDK users can opt into hybrid search (vector + keyword
RRF fusion). The underlying SearchRequest API model already supports the
field after the GDAI-1349 regeneration; only the wrapper signature and
test call were missing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.23%. Comparing base (4dc3f87) to head (d1b532c).

Files with missing lines Patch % Lines
...s/gooddata-sdk/src/gooddata_sdk/compute/service.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1443      +/-   ##
==========================================
- Coverage   77.24%   77.23%   -0.02%     
==========================================
  Files         227      227              
  Lines       14672    14674       +2     
==========================================
  Hits        11334    11334              
- Misses       3338     3340       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hkad98 hkad98 closed this Mar 18, 2026
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.

2 participants