GDI-HE / GeoPortal.rlp

Other
2 stars 0 forks source link

mod_callMetadata - searchServer: provide NEW-tag for new public WMC documents #86

Closed dpakprajul closed 1 month ago

dpakprajul commented 6 months ago

Issue replicated from Mrmap community: https://github.com/mrmap-community/Mapbender2.8/issues/24

in the old geoportal (typo3 based) there was a tag called "new" in the frontend Search-Client if there was published a new public WMC or an old was changed.

The new search-client from the django based geoportal depends on what the searchServer can provide.

so the search server should provide the two attributes

wmc_timestamp wmc_timestamp_create afterwards the django based geoportal search-client can be adjusted to provide a NEW tag again.

dpakprajul commented 6 months ago

image

dpakprajul commented 4 months ago

Rapidfuzz seems to work faster than thefuzz/fuzzywuzzy. If so, need to install rapidfuzz by adding in requirements.txt: rapidfuzz, or installing directly using pip install rapidfuzz. Other parameters neednot need to be changed since the API compatible implementation of all algorithms in thefuzz/fuzzywuzzy.

https://github.com/rapidfuzz/RapidFuzz

dpakprajul commented 2 months ago

Since the cache is not deleted in time, the number of viewer vary in the landing page and searching interface:

Landing page:

grafik

Searching interface

grafik

Neuste Karten

Since the tab is used less, one of the cache gets deleted, and hence showing another result from that cache. grafik

My idea:

We could make a cron job to call the function every 5 minutes to store the cache and also delete the older cache every 5 minutes. Hence it doesnot require human interaction for creating a cache. And hopefully, it will be faster and user who start to click after the cache is deleted doesn't have to wait 4 seconds to load the WMC (cron job will do it every 5 minutes).

For now we could reset the cache for every 10 minutes so that the number of views could be updated in landing page.

Andreasr28 commented 2 months ago

Suggest running the innovation unchanged for a few days to see what feedback there is and whether the performance really needs to be adjusted.