]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/search.php
hint blocked IPs about missing UA
[nominatim.git] / website / search.php
index 9c8c8a6ed07a2a8f65398807236f920b838763ab..bcd5718e2422ab1b795b24c28b3b993980280208 100755 (executable)
                                $sQuery = trim(str_replace($aData[0], ' ', $sQuery));
                        }
                }
-               elseif (preg_match('/(\\[|^|\\b)(-?[0-9]+[0-9.]*)[, ]+(-?[0-9]+[0-9.]*)(\\]|$|\\b)/', $sQuery, $aData))
+               elseif (preg_match('/(\\[|^|\\b)(-?[0-9]+[0-9]*\\.[0-9]+)[, ]+(-?[0-9]+[0-9]*\\.[0-9]+)(\\]|$|\\b)/', $sQuery, $aData))
                {
                        $fQueryLat = $aData[2];
                        $fQueryLon = $aData[3];
                                                                                                $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')