📄 fts3ac.test
字号:
Diana SeifertEOL PCG');INSERT INTO email([from],[to],subject,body) VALUES('enron_update@concureworkplace.com', 'mark.whitt@enron.com', '<<Concur Expense Document>> - 121001', 'The Approval status has changed on the following report:Status last changed by: Barry L. TycholizExpense Report Name: 121001Report Total: $198.98Amount Due Employee: $198.98Amount Approved: $198.98Amount Paid: $0.00Approval Status: ApprovedPayment Status: PendingTo review this expense report, click on the following link for Concur Expense.http://expensexms.enron.com');INSERT INTO email([from],[to],subject,body) VALUES('kevin.hyatt@enron.com', '', 'Technical Support', 'Outside the U.S., please refer to the list below:Australia:1800 678-515support@palm-au.comCanada:1905 305-6530support@palm.comNew Zealand:0800 446-398support@palm-nz.comU.K.:0171 867 0108eurosupport@palm.3com.comPlease refer to the Worldwide Customer Support card for a complete technical support contact list.');INSERT INTO email([from],[to],subject,body) VALUES('geoff.storey@enron.com', 'dutch.quigley@enron.com', 'RE:', 'duke contact? -----Original Message-----From: Quigley, Dutch Sent: Wednesday, October 31, 2001 10:14 AMTo: Storey, GeoffSubject: RE: bp corp Albert LaMore 281-366-4962running the reports now -----Original Message-----From: Storey, Geoff Sent: Wednesday, October 31, 2001 10:10 AMTo: Quigley, DutchSubject: RE: give me a contact over there tooBP -----Original Message-----From: Quigley, Dutch Sent: Wednesday, October 31, 2001 9:42 AMTo: Storey, GeoffSubject: Coral Jeff Whitnah 713-767-5374Relaint Steve McGinn 713-207-4000');INSERT INTO email([from],[to],subject,body) VALUES('pete.davis@enron.com', 'pete.davis@enron.com', 'Start Date: 4/22/01; HourAhead hour: 3; <CODESITE>', 'Start Date: 4/22/01; HourAhead hour: 3; No ancillary schedules awarded. Variances detected.Variances detected in Load schedule. LOG MESSAGES:PARSING FILE -->> O:\Portland\WestDesk\California Scheduling\ISO Final Schedules\2001042203.txt---- Load Schedule ----$$$ Variance found in table tblLoads. Details: (Hour: 3 / Preferred: 1.92 / Final: 1.89) TRANS_TYPE: FINAL LOAD_ID: PGE4 MKT_TYPE: 2 TRANS_DATE: 4/22/01 SC_ID: EPMI');INSERT INTO email([from],[to],subject,body) VALUES('john.postlethwaite@enron.com', 'john.zufferli@enron.com', 'Reference', 'John, hope things are going well up there for you. The big day is almost here for you and Jessica. I was wondering if I could use your name as a job reference if need be. I am just trying to get everything in order just in case something happens. John');INSERT INTO email([from],[to],subject,body) VALUES('jeffrey.shankman@enron.com', 'lschiffm@jonesday.com', 'Re:', 'I saw you called on the cell this a.m. Sorry I missed you. (I was in the shower). I have had a shitty week--I suspect my silence (not only to you, but others) after our phone call is a result of the week. I''m seeing Glen at 11:15....talk to you');INSERT INTO email([from],[to],subject,body) VALUES('litebytz@enron.com', '', 'Lite Bytz RSVP', 'This week''s Lite Bytz presentation will feature the following TOOLZ speaker:Richard McDougallSolaris 8Thursday, June 7, 2001If you have not already signed up, please RSVP via email to litebytz@enron.com by the end of the day Tuesday, June 5, 2001.*Remember: this is now a Brown Bag Event--so bring your lunch and we will provide cookies and drinks.Click below for more details.http://home.enron.com:84/messaging/litebytztoolzprint.jpg'); COMMIT; }} {}################################################################################ Everything above just builds an interesting test database. The actual# tests come after this comment.###############################################################################do_test fts3ac-1.2 { execsql { SELECT rowid FROM email WHERE email MATCH 'mark' }} {6 17 25 38 40 42 73 74}do_test fts3ac-1.3 { execsql { SELECT rowid FROM email WHERE email MATCH 'susan' }} {24 40}do_test fts3ac-1.4 { execsql { SELECT rowid FROM email WHERE email MATCH 'mark susan' }} {40}do_test fts3ac-1.5 { execsql { SELECT rowid FROM email WHERE email MATCH 'susan mark' }} {40}do_test fts3ac-1.6 { execsql { SELECT rowid FROM email WHERE email MATCH '"mark susan"' }} {}do_test fts3ac-1.7 { execsql { SELECT rowid FROM email WHERE email MATCH 'mark -susan' }} {6 17 25 38 42 73 74}do_test fts3ac-1.8 { execsql { SELECT rowid FROM email WHERE email MATCH '-mark susan' }} {24}do_test fts3ac-1.9 { execsql { SELECT rowid FROM email WHERE email MATCH 'mark OR susan' }} {6 17 24 25 38 40 42 73 74}# Some simple tests of the automatic "offsets(email)" column. In the sample# data set above, only one message, number 20, contains the words# "gas" and "reminder" in both body and subject.#do_test fts3ac-2.1 { execsql { SELECT rowid, offsets(email) FROM email WHERE email MATCH 'gas reminder' }} {20 {2 0 42 3 2 1 54 8 3 0 42 3 3 1 54 8 3 0 129 3 3 0 143 3 3 0 240 3}}do_test fts3ac-2.2 { execsql { SELECT rowid, offsets(email) FROM email WHERE email MATCH 'subject:gas reminder' }} {20 {2 0 42 3 2 1 54 8 3 1 54 8}}do_test fts3ac-2.3 { execsql { SELECT rowid, offsets(email) FROM email WHERE email MATCH 'body:gas reminder' }} {20 {2 1 54 8 3 0 42 3 3 1 54 8 3 0 129 3 3 0 143 3 3 0 240 3}}do_test fts3ac-2.4 { execsql { SELECT rowid, offsets(email) FROM email WHERE subject MATCH 'gas reminder' }} {20 {2 0 42 3 2 1 54 8}}do_test fts3ac-2.5 { execsql { SELECT rowid, offsets(email) FROM email WHERE body MATCH 'gas reminder' }} {20 {3 0 42 3 3 1 54 8 3 0 129 3 3 0 143 3 3 0 240 3}}# Document 32 contains 5 instances of the world "child". But only# 3 of them are paired with "product". Make sure only those instances# that match the phrase appear in the offsets(email) list.#do_test fts3ac-3.1 { execsql { SELECT rowid, offsets(email) FROM email WHERE body MATCH 'child product' AND +rowid=32 }} {32 {3 0 94 5 3 0 114 5 3 0 207 5 3 1 213 7 3 0 245 5 3 1 251 7 3 0 409 5 3 1 415 7 3 1 493 7}}do_test fts3ac-3.2 { execsql { SELECT rowid, offsets(email) FROM email WHERE body MATCH '"child product"' }} {32 {3 0 207 5 3 1 213 7 3 0 245 5 3 1 251 7 3 0 409 5 3 1 415 7}}# Snippet generator tests#do_test fts3ac-4.1 { execsql { SELECT snippet(email) FROM email WHERE email MATCH 'subject:gas reminder' }} {{Alert Posted 10:00 AM November 20,2000: E-<b>GAS</b> Request <b>Reminder</b>}}do_test fts3ac-4.2 { execsql { SELECT snippet(email) FROM email WHERE email MATCH 'christmas candlelight' }} {{<b>...</b> place.? What do you think about going here <b>Christmas</b> eve?? They have an 11:00 a.m. service and a <b>candlelight</b> service at 5:00 p.m., among others. <b>...</b>}}do_test fts3ac-4.3 { execsql { SELECT snippet(email) FROM email WHERE email MATCH 'deal sheet potential reuse' }} {{EOL-Accenture <b>Deal</b> <b>Sheet</b> <b>...</b> intent Review Enron asset base for <b>potential</b> <b>reuse</b>/ licensing Contract negotiations <b>...</b>}}do_test fts3ac-4.4 { execsql { SELECT snippet(email,'<<<','>>>',' ') FROM email WHERE email MATCH 'deal sheet potential reuse' }} {{EOL-Accenture <<<Deal>>> <<<Sheet>>> intent Review Enron asset base for <<<potential>>> <<<reuse>>>/ licensing Contract negotiations }}do_test fts3ac-4.5 { execsql { SELECT snippet(email,'<<<','>>>',' ') FROM email WHERE email MATCH 'first things' }} {{Re: <<<First>>> Polish Deal! Congrats! <<<Things>>> seem to be building rapidly now on the }}do_test fts3ac-4.6 { execsql { SELECT snippet(email) FROM email WHERE email MATCH 'chris is here' }} {{<b>chris</b>.germany@enron.com <b>...</b> Sounds good to me. I bet this <b>is</b> next to the Warick?? Hotel. <b>...</b> place.? What do you think about going <b>here</b> Christmas eve?? They have an 11:00 a.m. <b>...</b>}}do_test fts3ac-4.7 { execsql { SELECT snippet(email) FROM email WHERE email MATCH '"pursuant to"' }} {{Erin:<b>Pursuant</b> <b>to</b> your request, attached are the Schedule to <b>...</b>}}do_test fts3ac-4.8 { execsql { SELECT snippet(email) FROM email WHERE email MATCH 'ancillary load davis' }} {{pete.<b>davis</b>@enron.com <b>...</b> Start Date: 4/22/01; HourAhead hour: 3; No <b>ancillary</b> schedules awarded. Variances detected.Variances detected in <b>Load</b> schedule. LOG MESSAGES:PARSING <b>...</b>}}# Combinations of AND and OR operators:#do_test fts3ac-5.1 { execsql { SELECT snippet(email) FROM email WHERE email MATCH 'questar enron OR com' }} {{matt.smith@<b>enron</b>.<b>com</b> <b>...</b> six reports: 31 Keystone Receipts15 <b>Questar</b> Pipeline40 Rockies Production22 West_2 <b>...</b>}}do_test fts3ac-5.2 { execsql { SELECT snippet(email) FROM email WHERE email MATCH 'enron OR com questar' }} {{matt.smith@<b>enron</b>.<b>com</b> <b>...</b> six reports: 31 Keystone Receipts15 <b>Questar</b> Pipeline40 Rockies Production22 West_2 <b>...</b>}}finish_test
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -