We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
iam trying to get only two documents from mongodb using mongo_api:find/4 by adding limit to get the result but it is not working.
Key = #{<<"$query">> => #{<<"asset_id">> => Device_id,<<"packet_type">> => #{<<"$in">> => [<<"live">>,<<"historymod">>]},<<"packet_time">> => #{<<"$lte">> => PacketTime}},<<"$limit">> => #{<<"limit">> => 2},<<"$orderby">> => #{<<"packet_time">> => -1}}, mongo_api:find(hhd_mongopool_v2,?COLLECTION_TRACK, Key, #{}).
i have tried all possible way to add limit some are show below
i have tried to use batchsize also but not working . can anyone please help in this query to add limit
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
iam trying to get only two documents from mongodb using mongo_api:find/4 by adding limit to get the result but it is not working.
Key = #{<<"$query">> => #{<<"asset_id">> => Device_id,<<"packet_type">> => #{<<"$in">> => [<<"live">>,<<"historymod">>]},<<"packet_time">> => #{<<"$lte">> => PacketTime}},<<"$limit">> => #{<<"limit">> => 2},<<"$orderby">> => #{<<"packet_time">> => -1}},
mongo_api:find(hhd_mongopool_v2,?COLLECTION_TRACK, Key, #{}).
i have tried all possible way to add limit some are show below
i have tried to use batchsize also but not working . can anyone please help in this query to add limit
The text was updated successfully, but these errors were encountered: