Closed nichtich closed 1 year ago
I would also add an option for "non-negative sum". Do we need an option for "no -1 votes" as well?
I would also add an option for "non-negative sum".
I though to allow value of annotatedWith
to be any of regex [+-]1|[<>]?[0-9]+
Do we need an option for "no -1 votes" as well?
No. annotatedFor=!assesing
(neither +1 nor -1 votes) is enough.
I though to allow value of
annotatedWith
to be any of regex[+-]1|[<>]?[0-9]+
Yeah, I was considering that as well. So non-negative sum would be annotatedWith=>-1
? If we allow =
as well (for >=
), it would need to be encoded.
I don't mind whether >=0
or >-1
or both should be supported.
First implementation is now in Dev. Some caveats:
from
or to
, otherwise the annotatedWith
parameter will be ignored. This is for performance reasons since we would need to full table scan otherwise.[<>]?=?-?\d+
are supported. However, I've decided that at least one operator (=
, <
, >
, <=
, or >=
) is required since we're kind of misusing the annotatedWith
parameter. This means annotatedWith=1
will NOT use the sum of assessment annotations, but rather filter for annotations with bodyValue
of 1
(which there shouldn't be any because it's +1
). So to query mappings which have a sum of exactly 1
, you'd need to use annotatedWith==1
(which does work; the =
doesn't need to be encoded).annotatedWith=>-1
and annotatedWith=>=0
are supported and will return the same set of mappings.annotatedFor
is either not set or assessing
.To-Dos:
Annotation by vote (+1/-1) is meant as simple method to to asses mappings by any logged in user. When used in DA-3 or coli-rich we likely don't want to include mappings known to be assesed negatively. To do so a mapping query (
/mappings
or/mappings/infer
) needs an additional query parameter or extension of a parameter, e.g.:annotatedWith=+1
: mappings annotated with at least one +1 voteannotatedWith=-1
: mappings annotated with at least one -1 voteannotatedWith=1
: mappings annotated with sum 1 (e.g. twice +1 and once -1)annotatedWith=<0
: mappings annotated with negative sumIn Cocoda mapping search the "Assessment" filter could get two additional entries as search for specific sum is less important: