osm-search / Nominatim

Open Source search based on OpenStreetMap data
https://nominatim.org
GNU General Public License v3.0
3.12k stars 713 forks source link

Recreate word table when refreshing counts #3328

Closed lonvia closed 8 months ago

lonvia commented 8 months ago

When updating the frequency counts for words in the word table, the entries in the table have been simply updated until now. This is potentially expensive when it clashes with vacuuming (see #3315) and leaves a heavily bloated table.

Change the algorithm to create a new word table and switch out the old table.

For the planet this brings down the table size for the word table from 15GB to 8GB.