Merge lp:~zorba-coders/zorba/feature-ft_module into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Chris Hillery
Approved revision: no longer in the source branch.
Merged at revision: 10919
Proposed branch: lp:~zorba-coders/zorba/feature-ft_module
Merge into: lp:zorba
Diff against target: 56 lines (+35/-1)
3 files modified
src/runtime/full_text/ft_module_util.cpp (+1/-1)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenize-nodes-2.xml.res (+1/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-nodes-2.xq (+33/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/feature-ft_module
Reviewer Review Type Date Requested Status
Chris Hillery Approve
Paul J. Lucas Approve
Review via email: mp+113650@code.launchpad.net

Commit message

1. Added missing "lang" attribute to tokens generated from tokenize-nodes().
2. Added a test.

Description of the change

1. Added missing "lang" attribute to tokens generated from tokenize-nodes().
2. Added a test.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
10917. By David Graf

Unifying .bat and .vcproj generation. Bug #1013075 Approved: Rodolfo Ochoa, Dennis Knochenwefel

Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
10918. By Chris Hillery

EXPECTED_FAILURE()s for two tests failing due to flworfound.org changes. Approved: Matthias Brantner, Chris Hillery

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job feature-ft_module-2012-07-09T21-17-04.718Z is finished. The final status was:

All tests succeeded!

10919. By Paul J. Lucas

1. Added missing "lang" attribute to tokens generated from tokenize-nodes().
2. Added a test. Approved: Chris Hillery, Paul J. Lucas

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/runtime/full_text/ft_module_util.cpp'
2--- src/runtime/full_text/ft_module_util.cpp 2012-06-22 03:32:00 +0000
3+++ src/runtime/full_text/ft_module_util.cpp 2012-07-09 17:24:24 +0000
4@@ -34,7 +34,7 @@
5 Item const *api_item ) {
6 store::Item const *const item = Unmarshaller::getInternalItem( *api_item );
7 tokens_->push_back(
8- FTToken( utf8_s, utf8_len, token_no, sent_no, para_no, item )
9+ FTToken( utf8_s, utf8_len, token_no, sent_no, para_no, item, lang )
10 );
11 }
12
13
14=== added file 'test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenize-nodes-2.xml.res'
15--- test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenize-nodes-2.xml.res 1970-01-01 00:00:00 +0000
16+++ test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenize-nodes-2.xml.res 2012-07-09 17:24:24 +0000
17@@ -0,0 +1,1 @@
18+true
19
20=== added file 'test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-nodes-2.xq'
21--- test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-nodes-2.xq 1970-01-01 00:00:00 +0000
22+++ test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-nodes-2.xq 2012-07-09 17:24:24 +0000
23@@ -0,0 +1,33 @@
24+import module namespace ft = "http://www.zorba-xquery.com/modules/full-text";
25+import schema namespace fts = "http://www.zorba-xquery.com/modules/full-text";
26+
27+let $x :=
28+ <quotes>
29+ <quote xml:lang="en">
30+ I love you more than yesterday, less than tomorrow.
31+ </quote>
32+ <quote xml:lang="fr">
33+ Je t'aime plus qu'hier, moins que demain.
34+ </quote>
35+ </quotes>
36+
37+let $includes := $x//quote
38+let $excludes := ()
39+
40+let $tokens := ft:tokenize-nodes( $includes, $excludes )
41+
42+let $t1 := validate { $tokens[1] }
43+let $t2 := validate { $tokens[2] }
44+let $t3 := validate { $tokens[3] }
45+
46+let $t10 := validate { $tokens[10] }
47+let $t11 := validate { $tokens[11] }
48+
49+return $t1/@value = "I" and $t1/@lang = "en"
50+ and $t2/@value = "love" and $t2/@lang = "en"
51+ and $t3/@value = "you" and $t2/@lang = "en"
52+
53+ and $t10/@value = "Je" and $t10/@lang = "fr"
54+ and $t11/@value = "t'aime" and $t11/@lang = "fr"
55+
56+(: vim:set et sw=2 ts=2: :)

Subscribers

People subscribed via source and target branches