I am using Elasticsearch v.7.10.2 and Vega version is v.4.3.0.
I want to filter the dataset using AND logic and any of those codes below did not work.
They filter out the data if y equals to 0 no matter what y1 has.
1. {"type": "filter", "expr":"datum.y0 !== 0 & datum.y1 !== 0"}
2. {"type": "filter", "expr":"datum.y0 !== 0 && datum.y1 !== 0"}
3. {"type": "filter", "expr":"datum.y0 != 0 & datum.y1 != 0"}
4. {"type": "filter", "expr":"datum.y0 != 0 && datum.y1 != 0"}
I wonder why the code below works as I expected though. When I use the formula type, the value of delete would be true, only if y0 and also y1 is equal to 0.
{"type": "formula", "expr": "datum.y0 == 0 && datum.y1 == 0 ? true : false", "as":"delete"},