What does the dedupe parameter do in the Nominatim Search API?

548 Views Asked by At

It seem like it's doing more than just removing duplicates but I can't find any good documentation on it. The API docs currently just say:

dedupe=[0|1]

    No explanation yet.

I'm running my own Nominatim that's been forked from the original a few months ago and I use the public Nominatim as a back up when mine doesn't respond. So I am interested in answers regarding the latest public Nominatim. On my own Nominatim, I haven't noticed duplicates in results.

I have noticed differences when setting dedupe to 0 or 1. Here's a diff where you can see that even with dedupe=0, there are no duplicates yet with dedupe=1, the results are different. BTW dedupe=1 seem to match the default with no dedupe set.

Maybe Nominatim is removing duplicates based on GPS and boundaries and not just place_id's?

2

There are 2 best solutions below

0
On BEST ANSWER

you could check the source code in here. Basically, the dedupe parameter is used to check whether there is a duplicate on the search result or not. it will be used when generating the query to get the data from the database.

the parameters which are used when trying to check for duplication are place_id and the address (the country code, postcode, address, etc). you could check the sql function in here (the function is called get_address_by_language)

0
On

I have not heard of the dedupe parameter but found your question while searching for nominatim duplicate addresses.

I'm having an issue with some buildings existing twice in the Nominatim data with slightly different variants of the address (e.g. Avenue vs Boulevard suffix, front door vs back door as coordinates).