You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Amend MenuFilter.prototype.toggleFilter so that the value that is converted from '1' or '0' to true or false respectively before being set in this line.
This logic would also need to ascertain if the attributes being dealt with were intended as booleans, so as not to unintentionally convert numerical values to booleans.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
N.B. We are using Elasticsearch in the context of the AWS Elasticsearch Service.
Elasticsearch v5 allowed boolean attributes to be queried with '1' and '0' to represent true and false booleans respectively.
Elasticsearch v6 does not, instead insisting upon boolean attributes to be queried with boolean values only.
Proposed fix #1:
The ES query response for boolean values will look like:
{ key: 1, key_as_string: 'true' }
or{ key: 0, key_as_string: 'false' }
Amend
FacetAccessor.prototype.getBuckets
so that whereitem.key_as_string
exists, its value is assigned toitem.key
.This would require this line to be changed from:
item.key = String(item.key)
to
item.key = item.key_as_string || String(item.key);
Proposed fix #2:
Amend
MenuFilter.prototype.toggleFilter
so that the value that is converted from '1' or '0' to true or false respectively before being set in this line.This logic would also need to ascertain if the attributes being dealt with were intended as booleans, so as not to unintentionally convert numerical values to booleans.
The text was updated successfully, but these errors were encountered: