Autocomplete endpoint should return APIS id
Closed this issue · 21 comments
@sviatoplok is doing markup using the OfficeEntityPlugin, which does queries such as
https://mpr.acdh.oeaw.ac.at/apis/entities/autocomplete/place/?term=praha&q=praha&_type=query
The endpoint in this case returns the GeoNames id first, this then gets inserted into the word documents through the plugin, which is unintended. Please make the endpoint return the APIS id if the entry is present in the database.
Expected behaviour:
always return APIS-id first, even if there are multiple URIs associated with the entity.
This problem still remains, as does the connected merge problem #341 .
Update: created a merge request with potential fix for this issue. Fix re-orders the autocomplete suggestions to return entries with apis-id first (but still in original order, i.e. the first apis-id-entry first, then the second apis-id-entry, etc. and then all other suggestions in their original order).
Ok, after discussing it with Matthias just now, I see now that the root of the issue is different as to how it appeared in my local instance, working on a fix now, as the merge request won't resolve this specific case. This should then indeed fix issue #341 also.
also happens in the case of https://mpr.acdh.oeaw.ac.at/entity/3166
Ok, after discussing it with Matthias just now, I see now that the root of the issue is different as to how it appeared in my local instance, working on a fix now, as the merge request won't resolve this specific case. This should then indeed fix issue #341 also.
How is the fix coming?
Have you found out what the root of the problem is in the meantime, @gregorpirgie ?
this should be fixed in latest
Now, some of the problematic entries are not being displayed in the autocomplete list of the entity plugin.
This happens, e.g. with Prag and Ungarn.
Were there maybe changes made when bulk-updating?
Not sure whether I should reopen this.
And I just created this URL:
http://https//mpr.acdh.oeaw.ac.at/apis/api2/entity/3286/
Shouldn't that be https://mpr.acdh.oeaw.ac.at/apis/api2/entity/3286/
Right now, Hungary is not being returned by the entity plugIn at all, although it is in the MPR database.
Might this be about the place entities? It works fine in institutions...
Right now, Hungary is not being returned by the entity plugIn at all, although it is in the MPR database.
Confirming: https://mpr.acdh.oeaw.ac.at/entity/1398/ is not returned in https://mpr.acdh.oeaw.ac.at/apis/entities/autocomplete/place/?term=ungarn&q=ungarn&_type=query
Same with Reichsregierung, deutsches Reich https://mpr.acdh.oeaw.ac.at/entity/10744
@richardhadden could this be related to the recent changes to the autocomplete?
@richardhadden correctly mentioned that https://mpr.acdh.oeaw.ac.at/entity/1398/ does not contain its own uri. I will update the URIs in MPR this afternoon. lets check after that again.
Btw, mostly, the autocomplete works fine now, thanks for that! I could even find Żywiec today when I typed in Saybusch .
@richardhadden correctly mentioned that https://mpr.acdh.oeaw.ac.at/entity/1398/ does not contain its own uri. I will update the URIs in MPR this afternoon. lets check after that again.
Ah that explains the erratic behaviour. Very old entities are affected as IDs were only lateron included as URIs. Thx to @sennierer for fixing this database-wise soon :)
added the missing uris to the db and - at least the problem with "ungarn" - is resolved. Please reopen if other problems occur.
Many thanks, I already managed to merge, so it works.