When I call the following, I get the resulting output:
> FT.CREATE Results ON JSON SCHEMA $.a AS masterId TEXT $.b AS value numeric ...
> <Insert Data>
> FT.AGGREGATE Results .* GROUPBY 1 @masterId REDUCE SUM 1 @value AS value LIMIT 0 100
1) (integer) 3
2) 1) "masterId"
2) ""
3) "value"
4) "61.03"
3) 1) "masterId"
2) "1985748"
3) "value"
4) "121.78"
4) 1) "masterId"
2) "1985749"
3) "value"
4) "129.85"
I can then search for a list of items by specific masterId
with:
> FT.SEARCH Results @masterId:1985749 LIMIT 0 1000
1) (integer) 154
...
But I cannot work out how to search for the results for the "blank" @masterId:""
. Searching for double-quotes, single-quotes, NULL, etc all either return a syntax error, or 0 results. Is the correct syntax in the docs online somewhere & I'm just blind, is it some weird quirk around "empty" keys, or does it have to do with non-standard escape characters (e.g. I've tried \"\"
)?