forked from hans/Nominatim
reduce search depth when splitting word sets
Too many out-of-memory conditions with the current algorithm.
This commit is contained in:
@@ -55,7 +55,7 @@ function getWordSets($aWords, $iDepth)
|
|||||||
{
|
{
|
||||||
$aResult = array(array(join(' ', $aWords)));
|
$aResult = array(array(join(' ', $aWords)));
|
||||||
$sFirstToken = '';
|
$sFirstToken = '';
|
||||||
if ($iDepth < 8) {
|
if ($iDepth < 7) {
|
||||||
while (sizeof($aWords) > 1) {
|
while (sizeof($aWords) > 1) {
|
||||||
$sWord = array_shift($aWords);
|
$sWord = array_shift($aWords);
|
||||||
$sFirstToken .= ($sFirstToken?' ':'').$sWord;
|
$sFirstToken .= ($sFirstToken?' ':'').$sWord;
|
||||||
|
|||||||
Reference in New Issue
Block a user