wfProfileIn( __METHOD__ );
- // Some languages such as Chinese require word segmentation
- $out = $wgContLang->wordSegmentation( $string );
+ $out = parent::normalizeText( $string );
// MySQL fulltext index doesn't grok utf-8, so we
// need to fold cases and convert to hex
if( $this->mText === false ) {
$search->updateTitle($this->mId,
- Title::indexTitle( $this->mNamespace, $this->mTitle ));
+ $search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) );
wfProfileOut( $fname );
return;
}
wfRunHooks( 'SearchUpdate', array( $this->mId, $this->mNamespace, $this->mTitle, &$text ) );
# Perform the actual update
- $search->update($this->mId, Title::indexTitle( $this->mNamespace, $this->mTitle ),
- $text);
+ $search->update($this->mId, $search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ),
+ $search->normalizeText( $text ) );
wfProfileOut( $fname );
}
// Double-width roman characters
$s = self::convertDoubleWidth( $string );
$s = trim( $s );
+ $s = self::wordSegmentation( $s );
$s = parent::normalizeForSearch( $s );
wfProfileOut( __METHOD__ );