X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ec2d491dc8939ecf28ab84e26955bc7189618096..c3238682a8867edfb3c052ca4d2d27b3926ad17a:/lib/SearchContext.php diff --git a/lib/SearchContext.php b/lib/SearchContext.php index 3cb11e82..8316a012 100644 --- a/lib/SearchContext.php +++ b/lib/SearchContext.php @@ -2,7 +2,7 @@ namespace Nominatim; -require_once(CONST_BasePath.'/lib/lib.php'); +require_once(CONST_LibDir.'/lib.php'); /** @@ -32,7 +32,18 @@ class SearchContext public $sqlCountryList = ''; /// List of place IDs to exclude (as SQL). private $sqlExcludeList = ''; + /// Subset of word ids of full words in the query. + private $aFullNameWords = array(); + public function setFullNameWords($aWordList) + { + $this->aFullNameWords = $aWordList; + } + + public function getFullNameTerms() + { + return $this->aFullNameWords; + } /** * Check if a reference point is defined. @@ -203,7 +214,7 @@ class SearchContext } /** - * Get an SQL snipped for computing the distance from the reference point. + * Get an SQL snippet for computing the distance from the reference point. * * @param string $sObj SQL variable name to compute the distance from. * @@ -215,7 +226,7 @@ class SearchContext } /** - * Get an SQL snipped for checking if something is within range of the + * Get an SQL snippet for checking if something is within range of the * reference point. * * @param string $sObj SQL variable name to compute if it is within range. @@ -228,14 +239,14 @@ class SearchContext } /** - * Get an SQL snipped of the importance factor of the viewbox. + * Get an SQL snippet of the importance factor of the viewbox. * * The importance factor is computed by checking if an object is within * the viewbox and/or the extended version of the viewbox. * * @param string $sObj SQL variable name of object to weight the importance * - * @return string SQL snipped of the factor with a leading multiply sign. + * @return string SQL snippet of the factor with a leading multiply sign. */ public function viewboxImportanceSQL($sObj) { @@ -252,7 +263,7 @@ class SearchContext } /** - * SQL snipped checking if a place ID should be excluded. + * SQL snippet checking if a place ID should be excluded. * * @param string $sVariable SQL variable name of place ID to check, * potentially prefixed with more SQL.