sort/order ready: find the best matching database entry

Signed-off-by: Stefan Helmert <stefan.helmert@t-online.de>