Closed nelio2k closed 5 years ago
This is a bit of a strange parser error isn't it? Shouldn't equals10000
end up being an unexpected identifier rather than an arbitrary string?
I think "equals10000" fits an identifying rule, though. It's alpha-numeric and doesn't start with a number. There shouldn't be a limitation of naming convention.
Just re-read your comment. For equals10000 to be an arbitrary string, it needs to be enclosed in quotes. ( int > "equals10000" ) whereas without quotes as shown, it is assumed to be a field in a doc
When a weird filter gets entered, like: (int>equals10000) AND (int<>1000000) OR (float IS NOT NULL)
gojsonsm will be looking for "equals10000" in the doc. If it's not found, it returns an error "runtime error: index out of range"
It'd be nice to check for this condition and return something prettier as this message may cause mass hysteria when customers or support sees it.