Search-ui Issues with Elastic search connector and boolean aggregations

We are using Elastic Search-ui to connect to an on premise elastic installation. We are also using Facets, and most is working perfectly. However, when we want to use a boolean facet, out issues starts.
Elastic provides the boolean aggregation with the values 1 and 0, but the search-UI component expects true and false.
Can anyone point me in the direction i need to go to fix this?

Hey @Gorelldk,

I'll enter a bug in the Search UI repository for this. We'll need to update the BooleanFacet component to handle both 1/0 and true/false format. It should be a trivial fix.

In the meantime, you can create a custom view. You can use the code from the BooleanFacet as your base (just copy/paste it) and customize it to your needs.

Hey @JasonStoltz
Thanks for the quick response! The issue is that elastic still expects true/false as the filter, but returns 0/1 as the possible Keys in the facet options

I think the answer is still the same.

@JasonStoltz unfortunately the Facet.tsx calls a method called markSelectedFacetValuesFromFilters to determine which facet is selected. This method compares the filters (in this case the filter will have the value "true") and the facet options (which will be 0 and 1) and therefore the facet will never be marked as selected

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.