OpenConext / OpenConext-manage

Stores and publishes metadata of all entities known to OpenConext
Apache License 2.0
7 stars 10 forks source link

Bug in search-API #102

Open tvdijen opened 1 year ago

tvdijen commented 1 year ago

When setting coin:institution_id to 1 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.

thijskh commented 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.

oharsta commented 1 year ago

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