Do chinese ideogram indexing.
This commit is contained in:
parent
46eb7b5401
commit
da12070523
1 changed files with 21 additions and 0 deletions
|
|
@ -242,4 +242,25 @@ cmp_deeply (
|
||||||
"Index has decoded entities"
|
"Index has decoded entities"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Test that Chinese ideographical characters are inserted and searchable.
|
||||||
|
use utf8;
|
||||||
|
$article->update({
|
||||||
|
description => "甲骨文",
|
||||||
|
});
|
||||||
|
$indexer = WebGUI::Search::Index->create( $article );
|
||||||
|
|
||||||
|
$row = $db->quickHashRef( "SELECT * FROM assetIndex WHERE assetId=?", [ $article->getId ] );
|
||||||
|
cmp_deeply (
|
||||||
|
$row,
|
||||||
|
superhashof({
|
||||||
|
keywords => all( # keywords contains title, menuTitle, every part of the URL and every keyword
|
||||||
|
re("''甲''"),
|
||||||
|
re("''骨''"),
|
||||||
|
re("''文''"),
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
"Index has Chinese ideographs, separated by spaces and delimited with quotes to pad the length"
|
||||||
|
);
|
||||||
|
|
||||||
#vim:ft=perl
|
#vim:ft=perl
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue