Take an expression func, ensure we don't do runtime-checking (as the function) doesn't really exist, then map that function to a mongo operation exists(fieldname) regex(fieldname,value)
(node *expr.FuncNode)
| 333 | // regex(fieldname,value) |
| 334 | // |
| 335 | func (m *rewrite) walkFilterFunc(node *expr.FuncNode) (expr.Node, error) { |
| 336 | switch funcName := strings.ToLower(node.Name); funcName { |
| 337 | case "exists", "missing": |
| 338 | |
| 339 | default: |
| 340 | u.Warnf("not implemented %T", funcName) |
| 341 | } |
| 342 | |
| 343 | return node, nil |
| 344 | } |
| 345 | |
| 346 | // Take an expression func, ensure we don't do runtime-checking (as the function) |
| 347 | // doesn't really exist, then map that function to an Mongo Aggregation/MapReduce function |