Add the nearest query part