Closed stefandesu closed 2 years ago
Unfortunately, there are big performance issues with the new negative assertions (none
and !xyz
) because it always has to go through the whole result set. There are actually two issues:
My current workaround for 2 is to skip counting the values and return an unreasonably big number for X-Total-Count (like 9 999 999). Not returning any total count breaks our client applications (and I couldn't find a convention to say "there are more values, but we don't know how many"), and as far as I can see, there is no disadvantage to this except that it's a fake value. I think if this is documented properly, it should be okay.
@nichtich Do you have an opinion on this?
I was able to find a different solution for counting the total results for negative assertions for annotatedFor
: Count the results for the same query without annotatedFor
, then subtract the results from the same query but with opposite annotatedFor
. The code changes for this were a little difficult, but it seems to work very well. Closing this issue now!
We need some additional values for parameter
annotatedFor
on GET /mappings:any
: has any kind of annotationnone
: has no annotations at all!
, e.g.!assessing
: does not have annotations with that motivationRequired for https://github.com/gbv/cocoda/issues/605.