Problems using the API and "sort"
h0rst
h0rst at localh0rst.de
Thu Aug 4 05:16:28 EDT 2016
Hi there!
I'm trying to use the API to list all devices while sorting them by specific parameters.
In the below example i'm using "summary.lastInform" (but it does not matter which one
i'm using for "sort". The outcome is the same all the time). The query i use is the following:
curl -i 'http://127.0.0.1:7557/devices/?limit=10&skip=0&projection=_lastInform%2Csummary.serialNumber%&query=%7B%7D&sort=%7B%22summary.lastInform%22%3A1%7D'
This works fine until "skip=" is larger than 176. When this happens, i'm getting the following
Error in my mongodb.log:
> [conn165] assertion 10128 too much data for sort() with no index.
> add an index or specify a smaller limit ns:genieacsnew.devices
> query:{ $query: {}, orderby: { _lastInform: 1 } }
Without using sort, i can use "limit" and "skip" without any problems. I currently have around
1500 devices registered in GenieACS. The Problem ist probably not in GenieACS itself, but my
mongodb configuration. Maybe someone can point me in the right direction so i can fix this problem.
Thanks in advance!
Kind regards,
Sebastian
More information about the Users
mailing list