-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
I'm trying to use match with a timeseries database, but I'm getting this error:
julia> import Mongoc
julia> client = Mongoc.Client()
julia> db = client["my_db"]
julia> col = db["timeseries"]
julia> pipeline = Mongoc.BSON("""
[
{
"\$match": {
"timestamp": {
"\$gte": "2022-01-01T00:00:00",
"\$lte": "2022-02-01T00:00:00"
}
}
}
]""")
julia> Mongoc.find_one(col, pipeline)
ERROR: BSONError: domain=5, code=2, message=unknown operator: $match
Stacktrace:
[1] _iterate(cursor::Mongoc.Cursor{Mongoc.Collection}, state::Nothing)
@ Mongoc ~/.julia/packages/Mongoc/tJNDW/src/collection.jl:690
[2] _iterate
@ ~/.julia/packages/Mongoc/tJNDW/src/collection.jl:680 [inlined]
[3] find_one(collection::Mongoc.Collection, bson_filter::Mongoc.BSON; options::Nothing)
@ Mongoc ~/.julia/packages/Mongoc/tJNDW/src/collection.jl:332
[4] find_one(collection::Mongoc.Collection, bson_filter::Mongoc.BSON)
@ Mongoc ~/.julia/packages/Mongoc/tJNDW/src/collection.jl:327
[5] top-level scope
@ REPL[7]:1Metadata
Metadata
Assignees
Labels
No labels