Open tvdijen opened 1 year ago
I can reproduce this. Setting the metadata field to "1" or "12" or "21" and searching for that via the API yields no results, yet changing it to "AA" or "a21" I do get results when searching for that.
@thijskh This bug was already detected four years ago (!) and apparently we decided back then (can't remember though) that we would not solve this for backward compatibility reasons. See https://github.com/OpenConext/OpenConext-manage/commit/9198b91d4be226b4d7dd535c79bb177c22fbc329. The fix is fairly simple, your call.
When setting
coin:institution_id
to1
and then searching for it using the following command;curl -H 'Content-Type: application/json' -u test:test -X POST -d '{"metaDataFields.coin:institution_id":"1", "ALL_ATTRIBUTES":true}' 'http://localhost:9393/internal/search/saml20_idp'
will return nothing. When the institution ID is changed to
test
and the query is changed to reflect that, I do get a result. It appears that the search API doesn't deal with numeric values well.