search-ui icon indicating copy to clipboard operation
search-ui copied to clipboard

Organize filter values of the same field as an array of primitive values in the requestAdapter

Open wentaoxu415 opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. As of now, the filter values of the same field are organized as an array of objects due to how the rollup function is written in the search-ui/requestAdatapters.tsx file. This creates an issue where each filter value gets counted as 1 filter toward Elasticsearch's 32 filters limit and makes it much easier to hit this limit.

As this section of the App Search's documentation recommends, the filter values of the same field should be organized as an array of primitive values so that you can have have up to 1024 filter values under the same field and this would still count as 1 filter, which would allow the end-users to construct more complex queries

Describe the solution you'd like Refactor the rollup function in the requestAdapters function to combine filter values of the same field as an array of primitive objects, not as an array of objects.

Describe alternatives you've considered None

Additional context None

wentaoxu415 avatar Jun 15 '22 00:06 wentaoxu415

Thanks for highlighting @wentaoxu415 ! I will find out the reason why rollup was put into place.

joemcelroy avatar Jun 20 '22 02:06 joemcelroy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Is this issue still important to you? If so, please leave a comment and let us know. As always, thank you for your contributions.

botelastic[bot] avatar Aug 19 '22 02:08 botelastic[bot]