mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 02:58:13 +00:00
Various places where conversion from to ->aStructuredQuery had been missed
This commit is contained in:
@@ -871,10 +871,10 @@
|
|||||||
|
|
||||||
preg_match_all('/\\[([\\w ]*)\\]/u', $sQuery, $aSpecialTermsRaw, PREG_SET_ORDER);
|
preg_match_all('/\\[([\\w ]*)\\]/u', $sQuery, $aSpecialTermsRaw, PREG_SET_ORDER);
|
||||||
$aSpecialTerms = array();
|
$aSpecialTerms = array();
|
||||||
if (isset($aStructuredQuery['amenity']) && $aStructuredQuery['amenity'])
|
if (isset($this->aStructuredQuery['amenity']) && $this->aStructuredQuery['amenity'])
|
||||||
{
|
{
|
||||||
$aSpecialTermsRaw[] = array('['.$aStructuredQuery['amenity'].']', $aStructuredQuery['amenity']);
|
$aSpecialTermsRaw[] = array('['.$this->aStructuredQuery['amenity'].']', $this->aStructuredQuery['amenity']);
|
||||||
unset($aStructuredQuery['amenity']);
|
unset($this->aStructuredQuery['amenity']);
|
||||||
}
|
}
|
||||||
foreach($aSpecialTermsRaw as $aSpecialTerm)
|
foreach($aSpecialTermsRaw as $aSpecialTerm)
|
||||||
{
|
{
|
||||||
@@ -972,8 +972,8 @@
|
|||||||
foreach($aDatabaseWords as $aToken)
|
foreach($aDatabaseWords as $aToken)
|
||||||
{
|
{
|
||||||
// Very special case - require 2 letter country param to match the country code found
|
// Very special case - require 2 letter country param to match the country code found
|
||||||
if ($bStructuredPhrases && $aToken['country_code'] && !empty($aStructuredQuery['country'])
|
if ($bStructuredPhrases && $aToken['country_code'] && !empty($this->aStructuredQuery['country'])
|
||||||
&& strlen($aStructuredQuery['country']) == 2 && strtolower($aStructuredQuery['country']) != $aToken['country_code'])
|
&& strlen($this->aStructuredQuery['country']) == 2 && strtolower($this->aStructuredQuery['country']) != $aToken['country_code'])
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -1097,7 +1097,7 @@
|
|||||||
|
|
||||||
if (CONST_Debug) var_Dump($aGroupedSearches);
|
if (CONST_Debug) var_Dump($aGroupedSearches);
|
||||||
|
|
||||||
if (CONST_Search_TryDroppedAddressTerms && sizeof($aStructuredQuery) > 0)
|
if (CONST_Search_TryDroppedAddressTerms && sizeof($this->aStructuredQuery) > 0)
|
||||||
{
|
{
|
||||||
$aCopyGroupedSearches = $aGroupedSearches;
|
$aCopyGroupedSearches = $aGroupedSearches;
|
||||||
foreach($aCopyGroupedSearches as $iGroup => $aSearches)
|
foreach($aCopyGroupedSearches as $iGroup => $aSearches)
|
||||||
|
|||||||
Reference in New Issue
Block a user