You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2014/04/07 16:14:23 UTC

svn commit: r1585488 - in /db/derby/code/trunk/java: optional/org/apache/derby/optional/api/ optional/org/apache/derby/optional/lucene/ testing/org/apache/derbyTesting/functionTests/tests/lang/

Author: rhillegas
Date: Mon Apr  7 14:14:22 2014
New Revision: 1585488

URL: http://svn.apache.org/r1585488
Log:
DERBY-590: Add the ability to configure the query parser used for lucene queries; commit derby-590-20-aa-customQueryParser.diff.

Modified:
    db/derby/code/trunk/java/optional/org/apache/derby/optional/api/LuceneUtils.java
    db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneQueryVTI.java
    db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneSupport.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCoarseAuthorizationTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCollationTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportPermsTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/build.xml

Modified: db/derby/code/trunk/java/optional/org/apache/derby/optional/api/LuceneUtils.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/optional/org/apache/derby/optional/api/LuceneUtils.java?rev=1585488&r1=1585487&r2=1585488&view=diff
==============================================================================
--- db/derby/code/trunk/java/optional/org/apache/derby/optional/api/LuceneUtils.java (original)
+++ db/derby/code/trunk/java/optional/org/apache/derby/optional/api/LuceneUtils.java Mon Apr  7 14:14:22 2014
@@ -29,6 +29,7 @@ import java.util.Locale;
 
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.apache.lucene.queryparser.classic.QueryParser;
 import org.apache.lucene.util.Version;
 
 import org.apache.derby.iapi.sql.conn.ConnectionUtil;
@@ -161,6 +162,21 @@ public abstract class LuceneUtils
         return new StandardAnalyzer( currentVersion() );
     }
     
+    /**
+     * <p>
+     * Get the default, classic QueryParser.
+     * </p>
+     */
+    public  static  QueryParser defaultQueryParser
+        (
+         Version version,
+         String fieldName,
+         Analyzer analyzer
+         )
+    {
+        return new QueryParser( version, fieldName, analyzer );
+    }
+    
     /////////////////////////////////////////////////////////////////
     //
     //  MINIONS

Modified: db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneQueryVTI.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneQueryVTI.java?rev=1585488&r1=1585487&r2=1585488&view=diff
==============================================================================
--- db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneQueryVTI.java (original)
+++ db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneQueryVTI.java Mon Apr  7 14:14:22 2014
@@ -86,6 +86,7 @@ public class LuceneQueryVTI extends Stri
     // constructor args
     private Connection  _connection;
     private String  _queryText;
+    private String  _queryParserMaker;
     private int         _windowSize;
     private float   _scoreCeiling;
 
@@ -116,6 +117,7 @@ public class LuceneQueryVTI extends Stri
 	LuceneQueryVTI
         (
          String queryText,
+         String queryParserMaker,
          int    windowSize,
          float scoreCeiling
          )
@@ -125,6 +127,7 @@ public class LuceneQueryVTI extends Stri
         
         _connection = LuceneSupport.getDefaultConnection();
         _queryText = queryText;
+        _queryParserMaker = queryParserMaker;
         _windowSize = windowSize;
         _scoreCeiling = scoreCeiling;
 	}
@@ -428,11 +431,20 @@ public class LuceneQueryVTI extends Stri
             Properties  indexProperties = LuceneSupport.readIndexProperties( propertiesFile );
             String          analyzerMaker = indexProperties.getProperty( LuceneSupport.ANALYZER_MAKER );
             Analyzer    analyzer = LuceneSupport.getAnalyzer( analyzerMaker );
-				
+
             _indexReader = LuceneSupport.getIndexReader( new File( indexhome.toString() ) );
             _searcher = new IndexSearcher(_indexReader);
 
-            QueryParser qp = new QueryParser( LuceneUtils.currentVersion(), TEXT_FIELD_NAME, analyzer );
+            QueryParser qp = LuceneSupport.getQueryParser
+                (
+                 _queryParserMaker == null ?
+                 LuceneUtils.class.getName() + ".defaultQueryParser" : _queryParserMaker,
+                 
+                 LuceneUtils.currentVersion(),
+                 TEXT_FIELD_NAME,
+                 analyzer
+                 );
+				
             Query luceneQuery = qp.parse( _queryText );
             TopScoreDocCollector tsdc = TopScoreDocCollector.create( _windowSize, true);
             if ( _scoreCeiling != 0 ) {

Modified: db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneSupport.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneSupport.java?rev=1585488&r1=1585487&r2=1585488&view=diff
==============================================================================
--- db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneSupport.java (original)
+++ db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneSupport.java Mon Apr  7 14:14:22 2014
@@ -73,6 +73,7 @@ import org.apache.lucene.index.IndexRead
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.index.Term;
+import org.apache.lucene.queryparser.classic.QueryParser;
 import org.apache.lucene.queryparser.classic.ParseException;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.FSDirectory;
@@ -309,12 +310,13 @@ public class LuceneSupport implements Op
 	public static LuceneQueryVTI luceneQuery
         (
          String queryText,
+         String queryParserMaker,
          int    windowSize,
          float scoreCeiling
          )
         throws ParseException, IOException, SQLException
     {
-		LuceneQueryVTI lqvti = new LuceneQueryVTI( queryText, windowSize, scoreCeiling );
+		LuceneQueryVTI lqvti = new LuceneQueryVTI( queryText, queryParserMaker, windowSize, scoreCeiling );
 		return lqvti;
 	}
 	
@@ -483,7 +485,7 @@ public class LuceneSupport implements Op
             
         StringBuilder   tableFunction = new StringBuilder();
         tableFunction.append( "create function " + makeTableFunctionName( schema, table, textcol ) + "\n" );
-        tableFunction.append( "( query varchar( 32672 ), windowSize int, scoreCeiling real )\n" );
+        tableFunction.append( "( query varchar( 32672 ), queryParserMaker varchar( 32672 ), windowSize int, scoreCeiling real )\n" );
         tableFunction.append( "returns table\n(" );
 
         PreparedStatement   ps = null;
@@ -1852,4 +1854,40 @@ public class LuceneSupport implements Op
              );
 	}
 	
+	/**
+	 * Invoke a static method (possibly supplied by the user) to instantiate a QueryParser.
+     *
+     * @param queryParserMaker  Full name of public, static method whicn instantiates a QueryParser given the following arguments.
+     * @param version   Lucene version.
+     * @param fieldName Name of field holding the indexed text.
+     * @param analyzer  Analyzer used to index the text.
+	 */
+	static QueryParser getQueryParser
+        (
+         final String queryParserMaker,
+         final Version version,
+         final String fieldName,
+         final Analyzer analyzer
+         )
+        throws ClassNotFoundException, IllegalAccessException, InvocationTargetException,
+               NoSuchMethodException, PrivilegedActionException
+    {
+        return AccessController.doPrivileged
+            (
+             new PrivilegedExceptionAction<QueryParser>()
+             {
+                 public QueryParser run()
+                     throws ClassNotFoundException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
+                 {
+                     int    lastDotIdx = queryParserMaker.lastIndexOf( "." );
+                     Class<? extends Object>  klass = Class.forName( queryParserMaker.substring( 0, lastDotIdx ) );
+                     String methodName = queryParserMaker.substring( lastDotIdx + 1, queryParserMaker.length() );
+                     Method method = klass.getDeclaredMethod( methodName, Version.class, String.class, Analyzer.class );
+                     
+                     return (QueryParser) method.invoke( null, version, fieldName, analyzer );
+                 }
+             }
+             );
+	}
+	
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCoarseAuthorizationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCoarseAuthorizationTest.java?rev=1585488&r1=1585487&r2=1585488&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCoarseAuthorizationTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCoarseAuthorizationTest.java Mon Apr  7 14:14:22 2014
@@ -170,7 +170,7 @@ public class LuceneCoarseAuthorizationTe
 
         String  readPoemsIndex =
             "select p.originalAuthor, i.score\n" +
-            "from ruth.poems p, table ( ruth.poems__poemText( 'star', 1000, 0 ) ) i\n" +
+            "from ruth.poems p, table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) i\n" +
             "where p.poemID = i.poemID and p.versionStamp = i.versionStamp\n" +
             "order by i.score desc\n";
         String[][]  defaultPoemResults =

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCollationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCollationTest.java?rev=1585488&r1=1585487&r2=1585488&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCollationTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCollationTest.java Mon Apr  7 14:14:22 2014
@@ -150,7 +150,7 @@ public class LuceneCollationTest extends
         assertResults
             (
              conn,
-             "select * from table ( ruth.poems__poemText( 'star', 1000, 0 ) ) luceneResults order by poemID",
+             "select * from table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) luceneResults order by poemID",
              new String[][]
              {
                  { "3", "3", "2", "0.22933942" },

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportPermsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportPermsTest.java?rev=1585488&r1=1585487&r2=1585488&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportPermsTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportPermsTest.java Mon Apr  7 14:14:22 2014
@@ -40,8 +40,16 @@ import java.sql.Types;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Locale;
+
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.queryparser.classic.ParseException;
+import org.apache.lucene.queryparser.classic.QueryParser;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.util.Version;
+
 import junit.framework.Test;
 import junit.framework.TestSuite;
+
 import org.apache.derby.iapi.sql.conn.ConnectionUtil;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.JDBC;
@@ -190,7 +198,7 @@ public class LuceneSupportPermsTest exte
             ( ruthConnection, NONEXISTENT_INDEX, "call LuceneSupport.updateIndex( 'ruth', 'poems', 'originalAuthor', null )" );
 
         // alice can't view an index created by ruth
-        String  viewPoemsIndex = "select * from table ( ruth.poems__poemText( 'star', 1000, 0 ) ) luceneResults order by poemID";
+        String  viewPoemsIndex = "select * from table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) luceneResults order by poemID";
         expectExecutionError( aliceConnection, LACK_EXECUTE_PRIV, viewPoemsIndex );
 
         // but ruth can
@@ -299,7 +307,7 @@ public class LuceneSupportPermsTest exte
         }
 
         // but alice still needs select privilege on the base table columns
-        String  viewPoemsIndex = "select * from table ( ruth.poems__poemText( 'star', 1000, 0 ) ) luceneResults order by poemid";
+        String  viewPoemsIndex = "select * from table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) luceneResults order by poemid";
         String[][]  viewPoemsIndexResults = new String[][]
             {
                 { "3", "3", "2", "0.22933942" },
@@ -443,7 +451,7 @@ public class LuceneSupportPermsTest exte
             (
              ruthConnection,
              "select p.originalAuthor, i.score\n" +
-             "from ruth.poems p, table ( ruth.poems__poemText( 'star', 1000, 0 ) ) i\n" +
+             "from ruth.poems p, table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) i\n" +
              "where p.poemID = i.poemID and p.versionStamp = i.versionStamp\n" +
              "order by i.score desc\n",
              new String[][]
@@ -525,7 +533,7 @@ public class LuceneSupportPermsTest exte
 
         String  query =
             "select p.originalAuthor, i.score\n" +
-            "from ruth.poems p, table ( ruth.poems__poemText( 'star', 1000, 0 ) ) i\n" +
+            "from ruth.poems p, table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) i\n" +
             "where p.poemID = i.poemID and p.versionStamp = i.versionStamp\n" +
             "order by i.score desc\n";
 
@@ -633,7 +641,7 @@ public class LuceneSupportPermsTest exte
         // vet index contents
         String  selectFromViewIndex =
             "select p.originalAuthor, i.score\n" +
-            "from ruth.poems p, table ( ruth.poemView__poemText( 'star', 1000, 0 ) ) i\n" +
+            "from ruth.poems p, table ( ruth.poemView__poemText( 'star', null, 1000, 0 ) ) i\n" +
             "where p.poemID = i.poemID and p.versionStamp = i.versionStamp\n" +
             "order by i.score desc\n";
         assertResults
@@ -738,7 +746,7 @@ public class LuceneSupportPermsTest exte
             (
              ruthConnection,
              "select *\n" +
-             "from table ( ruth.poems__poemText( 'star', 1000, 0 ) ) i\n" +
+             "from table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) i\n" +
              "order by i.score desc\n",
              new String[][]
              {
@@ -802,6 +810,152 @@ public class LuceneSupportPermsTest exte
         goodStatement( ruthConnection, "drop table badTable4" );
     }
     
+   /**
+     * <p>
+     * Test changes to the arguments to the searching table function.
+     * </p>
+     */
+    public  void    test_009_searchArgs()
+        throws Exception
+    {
+        Connection  dboConnection = openUserConnection( TEST_DBO );
+        Connection  ruthConnection = openUserConnection( RUTH );
+
+        loadTestTable( ruthConnection );
+        
+        goodStatement( dboConnection, LOAD_TOOL );
+        goodStatement( ruthConnection, "call LuceneSupport.createIndex( 'ruth', 'textTable', 'textCol', null )" );
+
+        // get all the matches
+        assertResults
+            (
+             ruthConnection,
+             "select * from table( ruth.textTable__textCol( 'one two three four five six seven eight nine ten', null, 100, 0 ) ) t",
+             new String[][]
+             {
+                 { "10", "9", "2.2791052" },
+                 { "9", "8", "1.6305782" },
+                 { "8", "7", "1.1616905" },
+                 { "7", "6", "0.97469425" },
+                 { "6", "5", "0.6597747" },
+                 { "5", "4", "0.49575216" },
+                 { "4", "3", "0.33803377" },
+                 { "3", "2", "0.17799875" },
+                 { "2", "1", "0.09289266" },
+                 { "1", "0", "0.035006654" },
+             },
+             false
+             );
+        
+        // get an initial 3-row window of the top results
+        assertResults
+            (
+             ruthConnection,
+             "select * from table( ruth.textTable__textCol( 'one two three four five six seven eight nine ten', null, 3, 0 ) ) t",
+             new String[][]
+             {
+                 { "10", "9", "2.2791052" },
+                 { "9", "8", "1.6305782" },
+                 { "8", "7", "1.1616905" },
+             },
+             false
+             );
+        
+        // get the next 4-row window of results
+        assertResults
+            (
+             ruthConnection,
+             "select * from table( ruth.textTable__textCol( 'one two three four five six seven eight nine ten', null, 4, 1.0 ) ) t",
+             new String[][]
+             {
+                 { "7", "6", "0.97469425" },
+                 { "6", "5", "0.6597747" },
+                 { "5", "4", "0.49575216" },
+                 { "4", "3", "0.33803377" },
+             },
+             false
+             );
+
+        // get the final window of results
+        assertResults
+            (
+             ruthConnection,
+             "select * from table( ruth.textTable__textCol( 'one two three four five six seven eight nine ten', null, 100, 0.2 ) ) t",
+             new String[][]
+             {
+                 { "3", "2", "0.17799875" },
+                 { "2", "1", "0.09289266" },
+                 { "1", "0", "0.035006654" },
+             },
+             false
+             );
+        
+        // try a different query parser
+        assertResults
+            (
+             ruthConnection,
+             "select * from table( ruth.textTable__textCol( 'one two three four five six seven eight nine ten', 'org.apache.derbyTesting.functionTests.tests.lang.LuceneSupportPermsTest.constantStringQueryParser', 100, 0 ) ) t",
+             new String[][]
+             {
+                 { "1", "0", "1.597837" },
+                 { "2", "1", "0.9986481" },
+                 { "3", "2", "0.7989185" },
+                 { "4", "3", "0.7989185" },
+                 { "5", "4", "0.69905365" },
+                 { "6", "5", "0.59918886" },
+                 { "7", "6", "0.59918886" },
+                 { "8", "7", "0.49932405" },
+                 { "9", "8", "0.49932405" },
+                 { "10", "9", "0.49932405" },
+             },
+             false
+             );
+        
+        goodStatement( dboConnection, UNLOAD_TOOL );
+        unloadTestTable( ruthConnection );
+    }
+    private void    loadTestTable( Connection conn ) throws Exception
+    {
+        goodStatement
+            (
+             conn,
+             "create table textTable( keyCol int primary key, textCol clob )"
+             );
+        goodStatement
+            (
+             conn,
+             "insert into textTable values\n" +
+             "( 1, 'one' ),\n" +
+             "( 2, 'one two' ),\n" +
+             "( 3, 'one two three' ),\n" +
+             "( 4, 'one two three four' ),\n" +
+             "( 5, 'one two three four five' ),\n" +
+             "( 6, 'one two three four five six' ),\n" +
+             "( 7, 'one two three four five six seven' ),\n" +
+             "( 8, 'one two three four five six seven eight' ),\n" +
+             "( 9, 'one two three four five six seven eight nine' ),\n" +
+             "( 10, 'one two three four five six seven eight nine ten' ),\n" +
+             "( 101, 'bricks' ),\n" +
+             "( 102, 'bricks and mortar' ),\n" +
+             "( 103, 'bricks and mortar, tea' ),\n" +
+             "( 104, 'bricks and mortar, tea, tears' ),\n" +
+             "( 105, 'bricks and mortar, tea, tears, turtle' ),\n" +
+             "( 106, 'bricks and mortar, tea, tears, turtle, soup' ),\n" +
+             "( 107, 'bricks and mortar, tea, tears, turtle, soup, when in the course' ),\n" +
+             "( 108, 'bricks and mortar, tea, tears, turtle, soup, when in the course of human events' ),\n" +
+             "( 109, 'bricks and mortar, tea, tears, turtle, soup, when in the course of human events you want' ),\n" +
+             "( 110, 'bricks and mortar, tea, tears, turtle, soup, when in the course of human events you want better cell coverage' )\n"
+             );
+    }
+    private void    unloadTestTable( Connection conn ) throws Exception
+    {
+        goodStatement
+            (
+             conn,
+             "drop table textTable"
+             );
+    }
+
     ///////////////////////////////////////////////////////////////////////////////////
     //
     // MINIONS
@@ -1047,6 +1201,17 @@ public class LuceneSupportPermsTest exte
 
         return result;
     }
+
+    /** Alternative QueryParser maker, which forces the text to be a constant string */
+    public  static  QueryParser constantStringQueryParser
+        (
+         Version version,
+         String fieldName,
+         Analyzer analyzer
+         )
+    {
+        return new ConstantQueryParser( version, fieldName, analyzer );
+    }
     
     /**
      * Delete a file. If it's a directory, recursively delete all directories
@@ -1114,4 +1279,28 @@ public class LuceneSupportPermsTest exte
              );
     }
 
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // NESTED CLASSES
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    public  static  class   ConstantQueryParser extends QueryParser
+    {
+        public  ConstantQueryParser
+            (
+             Version version,
+             String fieldName,
+             Analyzer analyzer
+             )
+        {
+            super( version, fieldName, analyzer );
+        }
+
+        public Query parse( String query )  throws ParseException
+        {
+            return super.parse( "one" );
+        }
+    }
+
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportTest.java?rev=1585488&r1=1585487&r2=1585488&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportTest.java Mon Apr  7 14:14:22 2014
@@ -72,7 +72,7 @@ public class LuceneSupportTest extends B
             (
              s.executeQuery
              (
-              "select * from table ( lucenetest.titles__title( 'grapes', 1000, 0 ) ) luceneResults"
+              "select * from table ( lucenetest.titles__title( 'grapes', null, 1000, 0 ) ) luceneResults"
               ),
              expectedRows
              );
@@ -85,7 +85,7 @@ public class LuceneSupportTest extends B
             (
              s.executeQuery
              (
-              "select * from table ( lucenetest.titles__title( 'grapes', 1000, .75 ) ) luceneResults"
+              "select * from table ( lucenetest.titles__title( 'grapes', null, 1000, .75 ) ) luceneResults"
               ),
              expectedRows
              );
@@ -94,7 +94,7 @@ public class LuceneSupportTest extends B
             (
              s.executeQuery
              (
-              "select * from table ( lucenetest.titles__title( 'grapes',  1000, 0.5) ) luceneResults"
+              "select * from table ( lucenetest.titles__title( 'grapes',  null, 1000, 0.5) ) luceneResults"
               )
              );
 
@@ -108,7 +108,7 @@ public class LuceneSupportTest extends B
              s.executeQuery
              (
               "select title, author, publisher, documentID\n" +
-              "from lucenetest.titles t, table ( lucenetest.titles__title( 'grapes', 1000, 0 ) ) l\n" +
+              "from lucenetest.titles t, table ( lucenetest.titles__title( 'grapes', null, 1000, 0 ) ) l\n" +
               "where t.id = l.id\n" 
               ),
              expectedRows
@@ -133,7 +133,7 @@ public class LuceneSupportTest extends B
              s.executeQuery
              (
               "select *\n" +
-              "from table ( lucenetest.titles__title( 'mice', 1000, 0 ) ) luceneResults\n"
+              "from table ( lucenetest.titles__title( 'mice', null, 1000, 0 ) ) luceneResults\n"
               )
              );
 	    
@@ -145,7 +145,7 @@ public class LuceneSupportTest extends B
              s.executeQuery
              (
               "select *\n" +
-              "from table ( lucenetest.titles__title( 'mice', 1000, 0 ) ) luceneResults\n"
+              "from table ( lucenetest.titles__title( 'mice', null, 1000, 0 ) ) luceneResults\n"
               )
              );
 	    
@@ -162,7 +162,7 @@ public class LuceneSupportTest extends B
              s.executeQuery
              (
               "select *\n" +
-              "from table ( lucenetest.titles__title( 'mice', 1000, 0 ) ) luceneResults\n"
+              "from table ( lucenetest.titles__title( 'mice', null, 1000, 0 ) ) luceneResults\n"
               ),
              expectedRows
              );

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/build.xml?rev=1585488&r1=1585487&r2=1585488&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/build.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/build.xml Mon Apr  7 14:14:22 2014
@@ -82,6 +82,9 @@
       <classpath>
         <pathelement path="${compile.classpath}"/>
       	<pathelement path="${junit}"/>
+        <pathelement path="${lucene_core}"/>
+        <pathelement path="${lucene_a_co}"/>
+        <pathelement path="${lucene_qp}"/>
       </classpath>
       <include name="${this.dir}/*.java"/>
       <compilerarg value="-Xlint"/>