Skip to content

Dynamic input generation based on nested object values #1623

Discussion options

You must be logged in to vote

I seem to have found a solution, which I'll document here in case it's useful to someone else.

The problem is that the customized defaultQuery produces a result that is not structured in the way that ReactiveSearch expects. Specifically, because there is an outer filter aggregation and then an inner terms aggregation, the result that ReactiveSearch is expecting to be at response.aggregations.reactivesearch_nested["attributes.value"] is nested a level deeper, at response.aggregations.reactivesearch_nested.attribute_keys_filter.buckets[0]["attributes.value"].

My solution is to use the transformResponse hook in the ReactiveBase element to restructure the result so that it is shaped how React…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BenjaminStuermer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant