mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-23 21:14:11 +03:00
option to get list of search keywords
This commit is contained in:
parent
1951fddeab
commit
6e56919962
@ -148,6 +148,24 @@ foreach($aPolyPoints as $aPolyPoint)
|
|||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
|
if ($aPlaceSearchNameKeywords)
|
||||||
|
{
|
||||||
|
echo '<h2>Name Keywords</h2>';
|
||||||
|
foreach($aPlaceSearchNameKeywords as $aRow)
|
||||||
|
{
|
||||||
|
echo '<div>'.$aRow['word_token'].'</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($aPlaceSearchAddressKeywords)
|
||||||
|
{
|
||||||
|
echo '<h2>Address Keywords</h2>';
|
||||||
|
foreach($aPlaceSearchAddressKeywords as $aRow)
|
||||||
|
{
|
||||||
|
echo '<div>'.($aRow['word_token'][0]==' '?'*':'').$aRow['word_token'].'('.$aRow['word_id'].')'.'</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (sizeof($aParentOfLines))
|
if (sizeof($aParentOfLines))
|
||||||
{
|
{
|
||||||
echo '<h2>Parent Of (named features only):</h2>';
|
echo '<h2>Parent Of (named features only):</h2>';
|
||||||
|
@ -119,6 +119,18 @@
|
|||||||
$sSQL .= " order by rank_address asc,rank_search asc,get_name_by_language(name,$sLanguagePrefArraySQL),housenumber";
|
$sSQL .= " order by rank_address asc,rank_search asc,get_name_by_language(name,$sLanguagePrefArraySQL),housenumber";
|
||||||
$aParentOfLines = $oDB->getAll($sSQL);
|
$aParentOfLines = $oDB->getAll($sSQL);
|
||||||
|
|
||||||
|
$aPlaceSearchNameKeywords = false;
|
||||||
|
$aPlaceSearchAddressKeywords = false;
|
||||||
|
if (isset($_GET['keywords']) && $_GET['keywords'])
|
||||||
|
{
|
||||||
|
$sSQL = "select * from search_name where place_id = $iPlaceID";
|
||||||
|
$aPlaceSearchName = $oDB->getRow($sSQL);
|
||||||
|
$sSQL = "select * from word where word_id in (".substr($aPlaceSearchName['name_vector'],1,-1).")";
|
||||||
|
$aPlaceSearchNameKeywords = $oDB->getAll($sSQL);
|
||||||
|
$sSQL = "select * from word where word_id in (".substr($aPlaceSearchName['nameaddress_vector'],1,-1).")";
|
||||||
|
$aPlaceSearchAddressKeywords = $oDB->getAll($sSQL);
|
||||||
|
}
|
||||||
|
|
||||||
logEnd($oDB, $hLog, 1);
|
logEnd($oDB, $hLog, 1);
|
||||||
|
|
||||||
include(CONST_BasePath.'/lib/template/details-'.$sOutputFormat.'.php');
|
include(CONST_BasePath.'/lib/template/details-'.$sOutputFormat.'.php');
|
||||||
|
Loading…
Reference in New Issue
Block a user