gbv / jskos-server

Web service to access JSKOS data
https://coli-conc.gbv.de/api/
MIT License
6 stars 4 forks source link

Filter mappings by sum of assessment annotations #185

Closed nichtich closed 1 year ago

nichtich commented 1 year ago

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.:

In Cocoda mapping search the "Assessment" filter could get two additional entries as search for specific sum is less important:

stefandesu commented 1 year ago

I would also add an option for "non-negative sum". Do we need an option for "no -1 votes" as well?

nichtich commented 1 year ago

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.

stefandesu commented 1 year ago

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.

nichtich commented 1 year ago

I don't mind whether >=0 or >-1 or both should be supported.

stefandesu commented 1 year ago

First implementation is now in Dev. Some caveats:

To-Dos: