I have a requirement where i need to show the facets with all the facet values without even making the search. i'm able to capture the userinput and store it in state. when the user is trying to search i'm adding the user selection in the beforeSearchCall in the AppSearchAPIConnector as below. but i am getting the below error. any help is appreciated.
Unhandled Rejection (TypeError): Cannot read properties of undefined (reading 'totalResults')
I'm not very familiar with the Search UI library, but I believe you are not returning any value from the beforeSearchCall function when the if clause is not satisfied.
You should invoke next without the extra filters in an else branch to ensure you cover that case.
Can you please try it, or let me know what the next invocation returns so I can keep digging?
Thanks Carlos. I've tried this and it is still throwing the same error. Below is the error followed by the modified code. Appreciate you checking on this
Unhandled Rejection (TypeError): Cannot read properties of undefined (reading 'totalResults')
Thanks Carlos. i've modified my code and unfortunately...it is not even added to the search call. I've used the onSearch in the post you have mentioned and is working fine now. Thanks for your help.
when i add multiple filters, i'm getting below error.
An unexpected error occurred: [400] Filters contains an invalid value for item inside of field: filters root; must be an object
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.