#3558812: Retrieve results directly from index
Summary
Implements support in search_api_aais for retrieving Search API result field data directly from Azure AI Search.
This adds a new backend setting, modelled after Search API Solr’s “retrieve results directly” behaviour, that allows Azure AI Search responses to include indexed field values. When enabled, fields marked as retrievable on the Search API index are added to the Azure select parameter and then copied onto Search API result items during result parsing.
Details
Adds a retrieve_data backend configuration option to the Azure AI Search backend, including schema support and a checkbox on the backend configuration form.
Adds AzureAiSearchBackendInterface::retrieveData() so query-building and result-parsing code can consistently determine whether direct retrieval is enabled.
Adds retrievable-field helpers to IndexBuilder:
- Collects fields from the active Search API index configuration.
- Includes fields only when their
retrievableconfiguration is truthy. - Treats missing, false, or empty
retrievableconfiguration as not retrievable. - Excludes vector fields even if stale config marks them retrievable, matching Azure’s field behavior.
Updates QueryParamBuilder so, when direct retrieval is enabled, Azure queries select:
itemId- Any Search API index fields currently marked retrievable
Updates QueryResultParser so returned Azure fields are copied onto Search API result items:
- Creates cloned Search API field objects from the index field definitions.
- Normalises scalar and array Azure values into Search API field values.
- Skips missing response fields and NULL values.
- Leaves non-retrievable fields unset on result items.
- Preserves existing result count, score, captions, facets, answers, and alter-hook behaviour.
Closes #3558812