[Rt-commit] rt branch, 4.0/fts-mysql-multiple-queries, created. rt-4.0.4-279-g221b7b1

? sunnavy sunnavy at bestpractical.com
Fri Feb 3 05:35:16 EST 2012


The branch, 4.0/fts-mysql-multiple-queries has been created
        at  221b7b1aac34aa3222f5ff3547b37dcd1161b249 (commit)

- Log -----------------------------------------------------------------
commit 221b7b1aac34aa3222f5ff3547b37dcd1161b249
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Feb 3 18:34:35 2012 +0800

    test multiple "Content LIKE ..." search

diff --git a/t/fts/indexed_mysql.t b/t/fts/indexed_mysql.t
index 8966f1c..c8d4c0f 100644
--- a/t/fts/indexed_mysql.t
+++ b/t/fts/indexed_mysql.t
@@ -14,7 +14,7 @@ $sphinx{'indexer'} = RT::Test->find_executable('indexer');
 plan skip_all => "No searchd and indexer under PATH"
     unless $sphinx{'searchd'} && $sphinx{'indexer'};
 
-plan tests => 15;
+plan tests => 25;
 
 RT->Config->Set( FullTextSearch => Enable => 1, Indexed => 1, Table => 'AttachmentsIndex', MaxMatches => 1000 );
 
@@ -116,12 +116,17 @@ sub run_test {
     { Queue => $q->id },
     { Subject => 'book', Content => 'book' },
     { Subject => 'bar', Content => 'bar' },
+    { Subject => 'foobar', Content => 'foo bar' },
 );
 sync_index();
 
 run_tests(
-    "Content LIKE 'book'" => { book => 1, bar => 0 },
-    "Content LIKE 'bar'" => { book => 0, bar => 1 },
+    "Content LIKE 'book'" => { book => 1, bar => 0, foobar => 0 },
+    "Content LIKE 'bar'"  => { book => 0, bar => 1, foobar => 1 },
+    "Content LIKE 'foo' OR Content LIKE 'bar' " =>
+      { book => 0, bar => 1, foobar => 1 },
+    "Content LIKE 'foo' AND Content LIKE 'bar' " =>
+      { book => 0, bar => 0, foobar => 1 },
 );
 
 END {

-----------------------------------------------------------------------


More information about the Rt-commit mailing list