]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
add penalty for special term searches
[nominatim.git] / lib / Geocode.php
index 7f1d373319afcfe717a2b233e497630f34e61eb0..92e1a0b327d2b295bc6210427bc28af3eaa12d0e 100644 (file)
                                                                                                        $aSearch['sType'] = $aSearchTerm['type'];
                                                                                                        if (sizeof($aSearch['aName'])) $aSearch['sOperator'] = 'name';
                                                                                                        else $aSearch['sOperator'] = 'near'; // near = in for the moment
+                                                    if (strlen($aSearchTerm['operator']) == 0) $aSearch['iSearchRank'] += 1;
 
                                                                                                        // Do we have a shortcut id?
                                                                                                        if ($aSearch['sOperator'] == 'name')