(feat): Add Composition API support with CompositionSearcher - #435
Open
afrencalg wants to merge 1 commit into
Open
(feat): Add Composition API support with CompositionSearcher#435afrencalg wants to merge 1 commit into
afrencalg wants to merge 1 commit into
Conversation
Adds first-class support for the Algolia Composition API (/1/compositions/{compositionID}/run) to the instantsearch module:
CompositionSearcher: a SearcherForHits running a composition through CompositionClient, exposing the run response as a regular SearchResponse so it connects to the existing components (search box, hits, stats, facet list, filter state, paging).
CompositionFacetsSearcher: facet value search via /1/compositions/{compositionID}/facets/{facetName}/query, compatible with the facet list components.
FilterState connection with server-side disjunctive faceting: refined disjunctive attributes are annotated with the disjunctive() modifier in the requested facets (mirroring InstantSearch.js) instead of a client-side multi-query fan-out.
Lenient response mapping from composition models to standard search models via kotlinx-serialization.
New "Composition Search" showcase in the examples app (Experimental section) driving search box, stats and hits through a CompositionSearcher.
Unit tests covering searcher behavior, filter state connection, params conversion, disjunctive facet annotation and response mapping.
afrencalg
requested review from
anjola-adeuyi and
shaejaz
and removed request for
a team
August 16, 2026 14:59
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 30 |
| Duplication | 10 |
TIP This summary will be updated as you push new changes.
shaejaz
reviewed
Aug 19, 2026
Comment on lines
+153
to
+154
| text = "Compositions are configured per application in the Algolia dashboard. " + | ||
| "Enter the credentials of an application with at least one composition.", |
There was a problem hiding this comment.
so the latency app does not composition configured on it atm?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds first-class support for the Algolia Composition API (/1/compositions/{compositionID}/run) to the instantsearch module:
CompositionSearcher: a SearcherForHits running a composition through CompositionClient, exposing the run response as a regular SearchResponse so it connects to the existing components (search box, hits, stats, facet list, filter state, paging). CompositionFacetsSearcher: facet value search via /1/compositions/{compositionID}/facets/{facetName}/query, compatible with the facet list components. FilterState connection with server-side disjunctive faceting: refined disjunctive attributes are annotated with the disjunctive() modifier in the requested facets (mirroring InstantSearch.js) instead of a client-side multi-query fan-out. Lenient response mapping from composition models to standard search models via kotlinx-serialization. New "Composition Search" showcase in the examples app (Experimental section) driving search box, stats and hits through a CompositionSearcher. Unit tests covering searcher behavior, filter state connection, params conversion, disjunctive facet annotation and response mapping.