Project

General

Profile

Actions

Bug #18599

closed

Table table index_rel: don't write stopwords into

Added by Marco Peemoeller about 16 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2008-04-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The table index_rel can grows to enormous size and the performance of searchqueries slow down. I think it is not necessary to write stopwords into the table.

function submitWords($wl,$phash) {
$stopwords = array();
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('wid', 'index_words', 'is_stopword != 0');
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$stopwords[$row['wid']] = 1;
}

$GLOBALS['TYPO3_DB']->exec_DELETEquery('index_rel', 'phash='.intval($phash));
foreach($wl as $val)    {
if(isset($stopwords[$val['hash']])) {
continue;
}
$insertFields = array(
'phash' => $phash,
'wid' => $val['hash'],
'count' => $val['count'],
'first' => $val['first'],
'freq' => $this->freqMap(($val['count']/$this->wordcount)),
'flags' => ($val['cmp'] & $this->flagBitMask)
);
$GLOBALS['TYPO3_DB']->exec_INSERTquery('index_rel', $insertFields);
}
}
(issue imported from #M8083)

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #38742: indexed_search performance: function submitWords with exec_INSERTmultipleRowsClosed2012-06-19

Actions
Actions

Also available in: Atom PDF