You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by ca...@apache.org on 2012/01/13 00:02:08 UTC
svn commit: r1230828 - in /incubator/jena/Jena2/LARQ/trunk: ./
src/main/java/org/apache/jena/larq/ src/main/resources/META-INF/
src/test/java/org/apache/jena/larq/
Author: castagna
Date: Thu Jan 12 23:02:08 2012
New Revision: 1230828
URL: http://svn.apache.org/viewvc?rev=1230828&view=rev
Log:
Reduce diversity in the pom.xml.
Upgraded Lucene to 3.5.0: IndexWriter expungeDeletes() (used only in a test) and optimize() (used in IndexBuilderBase, but it could probably be removed) methods are now deprecated.
Modified:
incubator/jena/Jena2/LARQ/trunk/.classpath
incubator/jena/Jena2/LARQ/trunk/.project
incubator/jena/Jena2/LARQ/trunk/pom.xml
incubator/jena/Jena2/LARQ/trunk/src/main/java/org/apache/jena/larq/IndexLARQ.java
incubator/jena/Jena2/LARQ/trunk/src/main/resources/META-INF/DEPENDENCIES
incubator/jena/Jena2/LARQ/trunk/src/test/java/org/apache/jena/larq/TestLARQUtils.java
incubator/jena/Jena2/LARQ/trunk/src/test/java/org/apache/jena/larq/TestLuceneNRT.java
Modified: incubator/jena/Jena2/LARQ/trunk/.classpath
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/LARQ/trunk/.classpath?rev=1230828&r1=1230827&r2=1230828&view=diff
==============================================================================
--- incubator/jena/Jena2/LARQ/trunk/.classpath (original)
+++ incubator/jena/Jena2/LARQ/trunk/.classpath Thu Jan 12 23:02:08 2012
@@ -7,20 +7,19 @@
<classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.5/commons-codec-1.5.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.5/commons-codec-1.5-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.1.3/httpcore-4.1.3.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.1.3/httpcore-4.1.3-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/com/ibm/icu/icu4j/3.4.4/icu4j-3.4.4.jar" sourcepath="M2_REPO/com/ibm/icu/icu4j/3.4.4/icu4j-3.4.4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-arq/2.8.9-incubating-SNAPSHOT/jena-arq-2.8.9-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/jena/jena-arq/2.8.9-incubating-SNAPSHOT/jena-arq-2.8.9-incubating-SNAPSHOT-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-arq/2.8.9-incubating-SNAPSHOT/jena-arq-2.8.9-incubating-SNAPSHOT-tests.jar" sourcepath="M2_REPO/org/apache/jena/jena-arq/2.8.9-incubating-SNAPSHOT/jena-arq-2.8.9-incubating-SNAPSHOT-test-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-core/2.6.5-incubating-SNAPSHOT/jena-core-2.6.5-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/jena/jena-core/2.6.5-incubating-SNAPSHOT/jena-core-2.6.5-incubating-SNAPSHOT-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-iri/0.9.0-incubating-SNAPSHOT/jena-iri-0.9.0-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/jena/jena-iri/0.9.0-incubating-SNAPSHOT/jena-iri-0.9.0-incubating-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-arq/2.9.0-incubating/jena-arq-2.9.0-incubating.jar" sourcepath="M2_REPO/org/apache/jena/jena-arq/2.9.0-incubating/jena-arq-2.9.0-incubating-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-arq/2.9.0-incubating/jena-arq-2.9.0-incubating-tests.jar" sourcepath="M2_REPO/org/apache/jena/jena-arq/2.9.0-incubating/jena-arq-2.9.0-incubating-test-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-core/2.7.0-incubating/jena-core-2.7.0-incubating.jar" sourcepath="M2_REPO/org/apache/jena/jena-core/2.7.0-incubating/jena-core-2.7.0-incubating-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-iri/0.9.0-incubating/jena-iri-0.9.0-incubating.jar" sourcepath="M2_REPO/org/apache/jena/jena-iri/0.9.0-incubating/jena-iri-0.9.0-incubating-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-tdb/0.9.0-incubating-SNAPSHOT/jena-tdb-0.9.0-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/jena/jena-tdb/0.9.0-incubating-SNAPSHOT/jena-tdb-0.9.0-incubating-SNAPSHOT-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/4.9/junit-4.9.jar" sourcepath="M2_REPO/junit/junit/4.9/junit-4.9-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16.jar" sourcepath="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-core/3.4.0/lucene-core-3.4.0.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-core/3.4.0/lucene-core-3.4.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.9/wstx-asl-3.2.9.jar" sourcepath="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.9/wstx-asl-3.2.9-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.7.1/xercesImpl-2.7.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-core/3.5.0/lucene-core-3.5.0.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-core/3.5.0/lucene-core-3.5.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.10.0/xercesImpl-2.10.0.jar" sourcepath="M2_REPO/xerces/xercesImpl/2.10.0/xercesImpl-2.10.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
</classpath>
\ No newline at end of file
Modified: incubator/jena/Jena2/LARQ/trunk/.project
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/LARQ/trunk/.project?rev=1230828&r1=1230827&r2=1230828&view=diff
==============================================================================
--- incubator/jena/Jena2/LARQ/trunk/.project (original)
+++ incubator/jena/Jena2/LARQ/trunk/.project Thu Jan 12 23:02:08 2012
@@ -1,6 +1,6 @@
<projectDescription>
<name>jena-larq</name>
- <comment>LARQ - Free Text Indexing for SPARQL. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <comment>LARQ extends ARQ with free text queries for SPARQL. Indexing and searching is done using Apache Lucene. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects/>
<buildSpec>
<buildCommand>
Modified: incubator/jena/Jena2/LARQ/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/LARQ/trunk/pom.xml?rev=1230828&r1=1230827&r2=1230828&view=diff
==============================================================================
--- incubator/jena/Jena2/LARQ/trunk/pom.xml (original)
+++ incubator/jena/Jena2/LARQ/trunk/pom.xml Thu Jan 12 23:02:08 2012
@@ -31,45 +31,21 @@
<name>LARQ</name>
<version>1.0.0-incubating-SNAPSHOT</version>
- <description>LARQ - Free Text Indexing for SPARQL</description>
+ <description>LARQ extends ARQ with free text queries for SPARQL. Indexing and searching is done using Apache Lucene.</description>
<url>http://incubator.apache.org/jena/documentation/larq/</url>
- <properties>
- <ver.lucene>3.4.0</ver.lucene>
- <ver.arq>2.9.0-incubating</ver.arq>
- <ver.tdb>0.9.0-incubating-SNAPSHOT</ver.tdb>
- </properties>
-
- <developers>
- <developer>
- <id>andy_seaborne</id>
- <name>Andy Seaborne</name>
- <organization>Epimorphics Ltd.</organization>
- <organizationUrl>http://www.epimorphics.com/</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>0</timezone>
- </developer>
- <developer>
- <id>castagna</id>
- <name>Paolo Castagna</name>
- <organization>Talis Systems Ltd.</organization>
- <organizationUrl>http://www.talis.com/</organizationUrl>
- <roles>
- <role>developer</role>
- </roles>
- <timezone>0</timezone>
- </developer>
- </developers>
-
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/incubator/jena/Jena2/LARQ/trunk</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/jena/Jena2/LARQ/trunk</developerConnection>
<url>http://svn.apache.org/repos/asf/incubator/jena/Jena2/LARQ/</url>
</scm>
+ <properties>
+ <ver.lucene>3.5.0</ver.lucene>
+ <ver.arq>2.9.0-incubating</ver.arq>
+ <ver.tdb>0.9.0-incubating-SNAPSHOT</ver.tdb>
+ </properties>
+
<dependencies>
<dependency>
@@ -132,7 +108,14 @@
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
+ <version>true</version>
+ <show>public</show>
+ <quiet>true</quiet>
+ <encoding>UTF-8</encoding>
+ <windowtitle>${project.name} ${project.version}</windowtitle>
+ <doctitle>${project.name} ${project.version}</doctitle>
<includePackageNames>org.apache.jena.larq</includePackageNames>
+ <bottom>Licenced under the Apache License, Version 2.0</bottom>
</configuration>
</plugin>
@@ -150,25 +133,6 @@
<artifactId>maven-eclipse-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <version>0.7</version>
- <configuration>
- <excludes>
- <exclude>**/CHANGES.txt</exclude>
- <exclude>**/DISCLAIMER.txt</exclude>
- <exclude>**/TODO.txt</exclude>
- <exclude>**/.svn/**</exclude>
- <exclude>.git/**</exclude>
- <exclude>.gitignore</exclude>
- <exclude>**/.project</exclude>
- <exclude>**/target/**</exclude>
- <exclude>src/test/resources/**</exclude>
- </excludes>
- </configuration>
- </plugin>
-
</plugins>
</build>
Modified: incubator/jena/Jena2/LARQ/trunk/src/main/java/org/apache/jena/larq/IndexLARQ.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/LARQ/trunk/src/main/java/org/apache/jena/larq/IndexLARQ.java?rev=1230828&r1=1230827&r2=1230828&view=diff
==============================================================================
--- incubator/jena/Jena2/LARQ/trunk/src/main/java/org/apache/jena/larq/IndexLARQ.java (original)
+++ incubator/jena/Jena2/LARQ/trunk/src/main/java/org/apache/jena/larq/IndexLARQ.java Thu Jan 12 23:02:08 2012
@@ -201,10 +201,12 @@ public class IndexLARQ
private synchronized IndexSearcher getIndexSearcher() throws IOException {
if ( !reader.isCurrent() ) {
- IndexReader newReader = reader.reopen(true) ;
- reader.close();
- reader = newReader;
- searcher = new IndexSearcher(reader);
+ IndexReader newReader = IndexReader.openIfChanged(reader, true) ;
+ if ( newReader != null ) {
+ reader.close();
+ reader = newReader;
+ searcher = new IndexSearcher(reader);
+ }
}
return searcher ;
Modified: incubator/jena/Jena2/LARQ/trunk/src/main/resources/META-INF/DEPENDENCIES
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/LARQ/trunk/src/main/resources/META-INF/DEPENDENCIES?rev=1230828&r1=1230827&r2=1230828&view=diff
==============================================================================
--- incubator/jena/Jena2/LARQ/trunk/src/main/resources/META-INF/DEPENDENCIES (original)
+++ incubator/jena/Jena2/LARQ/trunk/src/main/resources/META-INF/DEPENDENCIES Thu Jan 12 23:02:08 2012
@@ -9,23 +9,19 @@ LARQ
From: 'an unknown organization'
- ICU4J (http://www-306.ibm.com/software/globalization/icu/) com.ibm.icu:icu4j:jar:3.4.4
License: ICU License (http://www-306.ibm.com/software/globalization/icu/license.jsp)
- - StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
+ - Xerces2-j (https://xerces.apache.org/xerces2-j/) xerces:xercesImpl:jar:2.10.0
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
- - xercesImpl xerces:xercesImpl:jar:2.7.1
-
+ - XML Commons External Components XML APIs (http://xml.apache.org/commons/components/external/) xml-apis:xml-apis:jar:1.4.01
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) License: The SAX License (http://www.saxproject.org/copying.html) License: The W3C License (http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.zip)
From: 'Apache Software Foundation' (http://www.apache.org)
- Apache Log4j (http://logging.apache.org/log4j/1.2/) log4j:log4j:bundle:1.2.16
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
-From: 'Codehaus' (http://www.codehaus.org/)
- - Woodstox (http://woodstox.codehaus.org) org.codehaus.woodstox:wstx-asl:jar:3.2.9
- License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
From: 'QOS.ch' (http://www.qos.ch)
- - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.6.1
+ - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.6.4
License: MIT License (http://www.opensource.org/licenses/mit-license.php)
- - SLF4J LOG4J-12 Binding (http://www.slf4j.org) org.slf4j:slf4j-log4j12:jar:1.6.1
+ - SLF4J LOG4J-12 Binding (http://www.slf4j.org) org.slf4j:slf4j-log4j12:jar:1.6.4
License: MIT License (http://www.opensource.org/licenses/mit-license.php)
From: 'The Apache Software Foundation' (http://www.apache.org/)
@@ -33,7 +29,7 @@ From: 'The Apache Software Foundation' (
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
- HttpClient (http://hc.apache.org/httpcomponents-client) org.apache.httpcomponents:httpclient:jar:4.1.2
License: Apache License (LICENSE.txt)
- - HttpCore (http://hc.apache.org/httpcomponents-core-ga) org.apache.httpcomponents:httpcore:jar:4.1.2
+ - HttpCore (http://hc.apache.org/httpcomponents-core-ga) org.apache.httpcomponents:httpcore:jar:4.1.3
License: Apache License (LICENSE.txt)
- ARQ (http://incubator.apache.org/jena/jena-arq) org.apache.jena:jena-arq:jar:2.9.0-incubating
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
@@ -41,7 +37,7 @@ From: 'The Apache Software Foundation' (
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
- IRI (http://incubator.apache.org/jena/jena-iri) org.apache.jena:jena-iri:jar:0.9.0-incubating
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
- - Lucene Core (http://lucene.apache.org/java/lucene-parent/lucene-core) org.apache.lucene:lucene-core:jar:3.4.0
+ - Lucene Core (http://lucene.apache.org/java/lucene-parent/lucene-core) org.apache.lucene:lucene-core:jar:3.5.0
License: Apache 2 (http://www.apache.org/licenses/LICENSE-2.0.txt)
Modified: incubator/jena/Jena2/LARQ/trunk/src/test/java/org/apache/jena/larq/TestLARQUtils.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/LARQ/trunk/src/test/java/org/apache/jena/larq/TestLARQUtils.java?rev=1230828&r1=1230827&r2=1230828&view=diff
==============================================================================
--- incubator/jena/Jena2/LARQ/trunk/src/test/java/org/apache/jena/larq/TestLARQUtils.java (original)
+++ incubator/jena/Jena2/LARQ/trunk/src/test/java/org/apache/jena/larq/TestLARQUtils.java Thu Jan 12 23:02:08 2012
@@ -18,11 +18,13 @@
package org.apache.jena.larq;
+import java.io.IOException;
import java.util.Iterator ;
import org.apache.jena.larq.IndexBuilderModel;
import org.apache.jena.larq.IndexLARQ;
import org.apache.jena.larq.LARQ;
+import org.apache.lucene.index.IndexReader;
import org.openjena.atlas.lib.StrUtils ;
import com.hp.hpl.jena.query.Query ;
@@ -75,7 +77,9 @@ public class TestLARQUtils
}
public static IndexLARQ createIndex(String datafile, IndexBuilderModel indexBuilder)
- { return createIndex(ModelFactory.createDefaultModel(), datafile, indexBuilder) ; }
+ {
+ return createIndex(ModelFactory.createDefaultModel(), datafile, indexBuilder) ;
+ }
public static IndexLARQ createIndex(Model model, String datafile, IndexBuilderModel indexBuilder)
{
@@ -86,4 +90,10 @@ public class TestLARQUtils
return indexBuilder.getIndex() ;
}
+ public static IndexReader openIfChanged (IndexReader reader) throws IOException
+ {
+ IndexReader newIndexReader = IndexReader.openIfChanged(reader) ;
+ return newIndexReader != null ? newIndexReader : reader ;
+ }
+
}
Modified: incubator/jena/Jena2/LARQ/trunk/src/test/java/org/apache/jena/larq/TestLuceneNRT.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/LARQ/trunk/src/test/java/org/apache/jena/larq/TestLuceneNRT.java?rev=1230828&r1=1230827&r2=1230828&view=diff
==============================================================================
--- incubator/jena/Jena2/LARQ/trunk/src/test/java/org/apache/jena/larq/TestLuceneNRT.java (original)
+++ incubator/jena/Jena2/LARQ/trunk/src/test/java/org/apache/jena/larq/TestLuceneNRT.java Thu Jan 12 23:02:08 2012
@@ -128,7 +128,7 @@ public class TestLuceneNRT {
assertEquals(0, reader.maxDoc());
assertEquals(0, count(reader, term));
- reader = reader.reopen();
+ reader = TestLARQUtils.openIfChanged(reader);
assertTrue(reader.isCurrent());
assertEquals(1, count(reader, term));
@@ -136,15 +136,15 @@ public class TestLuceneNRT {
assertEquals(2, writer.maxDoc());
assertEquals(1, count(reader, term));
- reader = reader.reopen();
+ reader = TestLARQUtils.openIfChanged(reader);
assertEquals(1, count(reader, term));
writer.commit();
- reader = reader.reopen();
+ reader = TestLARQUtils.openIfChanged(reader);
assertEquals(2, writer.maxDoc());
assertEquals(0, count(reader, term));
- reader = reader.reopen();
+ reader = TestLARQUtils.openIfChanged(reader);
assertEquals(0, count(reader, term));
writer.expungeDeletes();
@@ -159,7 +159,7 @@ public class TestLuceneNRT {
assertFalse(reader.isCurrent());
assertEquals(0, reader.maxDoc());
- reader = reader.reopen();
+ reader = TestLARQUtils.openIfChanged(reader);
assertTrue(reader.isCurrent());
assertEquals(1, reader.maxDoc());
@@ -215,7 +215,7 @@ public class TestLuceneNRT {
assertFalse(reader.isCurrent());
assertEquals(0, reader.maxDoc());
- reader = reader.reopen();
+ reader = TestLARQUtils.openIfChanged(reader);
assertTrue(reader.isCurrent());
assertEquals(1, reader.maxDoc());
}
@@ -244,7 +244,7 @@ public class TestLuceneNRT {
assertEquals(0, reader.maxDoc());
assertEquals(0, count(reader, term));
- reader = reader.reopen();
+ reader = TestLARQUtils.openIfChanged(reader);
assertTrue(reader.isCurrent());
assertEquals(1, count(reader, term));
@@ -252,15 +252,15 @@ public class TestLuceneNRT {
assertEquals(2, writer.maxDoc());
assertEquals(1, count(reader, term));
- reader = reader.reopen();
+ reader = TestLARQUtils.openIfChanged(reader);
assertEquals(1, count(reader, term));
writer.commit();
- reader = reader.reopen();
+ reader = TestLARQUtils.openIfChanged(reader);
assertEquals(2, writer.maxDoc());
assertEquals(0, count(reader, term));
- reader = reader.reopen();
+ reader = TestLARQUtils.openIfChanged(reader);
assertEquals(0, count(reader, term));
writer.expungeDeletes();