Kouhei Sutou
null+****@clear*****
Mon May 28 14:44:50 JST 2018
Kouhei Sutou 2018-05-28 14:44:50 +0900 (Mon, 28 May 2018) New Revision: f82c479ad9fae0523ea232178fcc426044a14630 https://github.com/groonga/groonga/commit/f82c479ad9fae0523ea232178fcc426044a14630 Message: test: add highlight_html with report_source_offset It doesn't get good result... Added files: test/command/suite/select/function/highlight_html/lexicon/loose_and_include_removed_source_location.expected test/command/suite/select/function/highlight_html/lexicon/loose_and_include_removed_source_location.test Added: test/command/suite/select/function/highlight_html/lexicon/loose_and_include_removed_source_location.expected (+37 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/function/highlight_html/lexicon/loose_and_include_removed_source_location.expected 2018-05-28 14:44:50 +0900 (e145fb65f) @@ -0,0 +1,37 @@ +table_create Entries TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Entries body COLUMN_SCALAR ShortText +[[0,0.0,0.0],true] +table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer 'TokenNgram("loose_symbol", true, "report_source_location", true, "include_removed_source_location", false)' --normalizer 'NormalizerNFKC100("include_removed_source_location", false, "report_source_offset", true)' +[[0,0.0,0.0],true] +column_create Terms document_index COLUMN_INDEX|WITH_POSITION Entries body +[[0,0.0,0.0],true] +load --table Entries +[ +{"body": "( あいうえお )"} +] +[[0,0.0,0.0],1] +select Entries --match_columns body --query 'あいうえお' --output_columns 'highlight_html(body, Terms)' +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 1 + ], + [ + [ + "highlight_html", + null + ] + ], + [ + "( <span class=\"keyword\">あいうえお </span>)" + ] + ] + ] +] Added: test/command/suite/select/function/highlight_html/lexicon/loose_and_include_removed_source_location.test (+21 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/function/highlight_html/lexicon/loose_and_include_removed_source_location.test 2018-05-28 14:44:50 +0900 (5150e94c7) @@ -0,0 +1,21 @@ +table_create Entries TABLE_NO_KEY +column_create Entries body COLUMN_SCALAR ShortText + +table_create Terms TABLE_PAT_KEY ShortText \ + --default_tokenizer 'TokenNgram("loose_symbol", true, \ + "report_source_location", true, \ + "include_removed_source_location", false)' \ + --normalizer 'NormalizerNFKC100("include_removed_source_location", false, \ + "report_source_offset", true)' +column_create Terms document_index COLUMN_INDEX|WITH_POSITION Entries body + +load --table Entries +[ +{"body": "( あいうえお )"} +] + +select Entries \ + --match_columns body \ + --query 'あいうえお' \ + --output_columns 'highlight_html(body, Terms)' + -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180528/4e059652/attachment-0001.htm