Skip to content

Commit

Permalink
Merge branch 'shabanovd-cleanup/sweping_old_FT_index' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ljo committed Jul 7, 2015
2 parents e4d2a2b + b79f3ae commit 09856fc
Show file tree
Hide file tree
Showing 42 changed files with 207 additions and 850 deletions.
61 changes: 29 additions & 32 deletions build/scripts/junit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
<!-- ======================================================================= -->
<!-- eXist-db build file : Run jUnit tests -->
<!-- ======================================================================= -->
<!-- $Id$ -->

<project basedir="../.." default="test" name="jUnit tests">

<description>jUnit tests for eXist-db</description>

<!-- import common targets -->
Expand All @@ -23,7 +22,7 @@
</path>

<condition property="junit.haltonerror" value="true" else="false">
<isset property="test.haltonerror"/>
<isset property="test.haltonerror"/>
</condition>

<condition property="junit.haltonfailure" value="true" else="false">
Expand All @@ -40,8 +39,8 @@
<property name="jetty.port" value="8080" />
<property name="jetty.port.ssl" value="8443" />
<!-- Or shall we rather have two, eg
jetty.port.jetty and jetty.port.standalone
with jetty.port pointing to jetty.port.jetty? /ljo -->
jetty.port.jetty and jetty.port.standalone
with jetty.port pointing to jetty.port.jetty? /ljo -->
<property name="jetty.port.jetty" value="8080" />
<property name="jetty.port.ssl.jetty" value="8443" />
<property name="jetty.port.standalone" value="8088" />
Expand Down Expand Up @@ -122,7 +121,7 @@
maxmemory="${junit.forked.VM.maxmemory}">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="java.util.logging.manager" value="org.apache.logging.log4j.jul.LogManager"/>
<!-- local database, so should not be needed. /ljo -->
<!-- local database, so should not be needed. /ljo -->
<sysproperty key="jetty.port" value="${jetty.port}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl}" />
<classpath refid="classpath.core"/>
Expand Down Expand Up @@ -158,9 +157,8 @@
<test fork="yes" name="org.exist.xupdate.StressTest" todir="${junit.reports.dat}"/>
<test fork="yes" name="org.exist.xquery.AllXqueryTests" todir="${junit.reports.dat}"/>
<test fork="yes" name="org.exist.xquery.OptimizerTest" todir="${junit.reports.dat}"/>
<test fork="yes" name="org.exist.collections.triggers.AllTriggerTests" todir="${junit.reports.dat}"/>
<test fork="yes" name="org.exist.collections.AllCollectionTests" todir="${junit.reports.dat}"/>
<!-- <test fork="yes" name="org.exist.fulltext.AllFulltextTests" todir="${junit.reports.dat}"/> -->
<test fork="yes" name="org.exist.collections.triggers.AllTriggerTests" todir="${junit.reports.dat}"/>
<test fork="yes" name="org.exist.collections.AllCollectionTests" todir="${junit.reports.dat}"/>
<test fork="yes" name="org.exist.security.XMLDBSecurityTest" todir="${junit.reports.dat}"/>
<test fork="yes" name="org.exist.security.SecurityManagerRoundtripTest" todir="${junit.reports.dat}"/>

Expand All @@ -180,18 +178,17 @@
<exclude name="**/storage/lock/*.java"/>
<exclude name="**/soap/*.java"/>
<exclude name="**/numbering/*.java"/>
<exclude name="**/collections/*.java"/>
<exclude name="**/collections/*.java"/>
<exclude name="**/security/*.java"/>
<exclude name="org/exist/*.java"/>
<exclude name="**/fulltext/**/*.java"/>
<exclude name="org/exist/http/underheavyload/*.java"/>
<exclude name="org/exist/util/hashtable/Abstract*.java"/>
<exclude name="org/exist/http/underheavyload/*.java"/>
<exclude name="org/exist/util/hashtable/Abstract*.java"/>
<exclude name="xquery/**/*.java"/>
</fileset>
</batchtest>
</junit>
</target>

<!-- Test set 2 : Jetty Server -->
<target name="test-jetty">
<echo message="------------------------------------------"/>
Expand All @@ -201,7 +198,7 @@
<junit haltonfailure="${junit.haltonfailure}" haltonerror="${junit.haltonerror}" printsummary="yes" showoutput="${junit.output}" maxmemory="${junit.forked.VM.maxmemory}">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="java.util.logging.manager" value="org.apache.logging.log4j.jul.LogManager"/>
<!-- fixme! - jetty.port.jetty /ljo -->
<!-- fixme! - jetty.port.jetty /ljo -->
<sysproperty key="jetty.port" value="${jetty.port}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl}" />
<classpath refid="classpath.core"/>
Expand Down Expand Up @@ -233,7 +230,7 @@
<junit haltonfailure="${junit.haltonfailure}" haltonerror="${junit.haltonerror}" printsummary="on" showoutput="${junit.output}" fork="no">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="java.util.logging.manager" value="org.apache.logging.log4j.jul.LogManager"/>
<!-- local database, so should not be needed. /ljo -->
<!-- local database, so should not be needed. /ljo -->
<sysproperty key="jetty.port" value="${jetty.port}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl}" />
<classpath refid="classpath.core"/>
Expand All @@ -256,7 +253,7 @@
<junit haltonfailure="${junit.haltonfailure}" haltonerror="${junit.haltonerror}" printsummary="on" showoutput="${junit.output}" fork="yes" maxmemory="${junit.forked.VM.maxmemory}">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="java.util.logging.manager" value="org.apache.logging.log4j.jul.LogManager"/>
<!-- local database, so should not be needed. /ljo -->
<!-- local database, so should not be needed. /ljo -->
<sysproperty key="jetty.port" value="${jetty.port}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl}" />
<classpath refid="classpath.core"/>
Expand Down Expand Up @@ -287,7 +284,7 @@
<java classname="org.exist.jetty.StandaloneServer">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="java.util.logging.manager" value="org.apache.logging.log4j.jul.LogManager"/>
<!-- fixme! - jetty.port.standalone /ljo -->
<!-- fixme! - jetty.port.standalone /ljo -->
<sysproperty key="jetty.port" value="${jetty.port.standalone}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl.standalone}" />
<classpath refid="classpath.core"/>
Expand All @@ -307,7 +304,7 @@
<junit haltonfailure="${junit.haltonfailure}" haltonerror="${junit.haltonerror}" printsummary="yes" showoutput="${junit.output}" maxmemory="${junit.forked.VM.maxmemory}">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="java.util.logging.manager" value="org.apache.logging.log4j.jul.LogManager"/>
<!-- fixme! - jetty.port.standalone /ljo -->
<!-- fixme! - jetty.port.standalone /ljo -->
<sysproperty key="jetty.port" value="${jetty.port.standalone}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl.standalone}" />
<classpath refid="classpath.core"/>
Expand Down Expand Up @@ -337,7 +334,7 @@
<junit haltonfailure="${junit.haltonfailure}" haltonerror="${junit.haltonerror}" printsummary="yes" showoutput="${junit.output}" maxmemory="${junit.forked.VM.maxmemory}">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="java.util.logging.manager" value="org.apache.logging.log4j.jul.LogManager"/>
<!-- local database, so should not be needed. /ljo -->
<!-- local database, so should not be needed. /ljo -->
<sysproperty key="jetty.port" value="${jetty.port}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl}" />
<classpath refid="classpath.core"/>
Expand All @@ -360,7 +357,7 @@
<junit haltonfailure="${junit.haltonfailure}" haltonerror="${junit.haltonerror}" printsummary="yes" showoutput="${junit.output}" maxmemory="${junit.forked.VM.maxmemory}">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="java.util.logging.manager" value="org.apache.logging.log4j.jul.LogManager"/>
<!-- fixme! - jetty.port.jetty /ljo -->
<!-- fixme! - jetty.port.jetty /ljo -->
<sysproperty key="jetty.port" value="${jetty.port}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl}" />
<classpath refid="classpath.core"/>
Expand All @@ -382,9 +379,9 @@
<!-- Register Ant tasks for eXist-db -->
<typedef resource="org/exist/ant/antlib.xml" uri="http://exist-db.org/ant">

<!-- fixme! - jetty.port.standalone.
But no need to pass in here in shutdown.
And no .ssl needed. /ljo -->
<!-- fixme! - jetty.port.standalone.
But no need to pass in here in shutdown.
And no .ssl needed. /ljo -->
<sysproperty key="jetty.port" value="${jetty.port.standalone}" />
<classpath refid="classpath.core"/>
<classpath refid="classpath.junit"/>
Expand Down Expand Up @@ -422,14 +419,14 @@
<delete failonerror="false">
<fileset dir="${junit.reports}/src/org/exist/xquery/xqts/" excludes="XQTS_case.java,XQTS_To_junit.java,QT3TS_case.java,QT3TS_To_junit.java"/>
</delete>
<!-- workaround include bug -->
<copy todir="${basedir}/cat">
<fileset dir="${junit.reports}/external/XQTS_1_0_3/cat"/>
</copy>
<!-- workaround include bug -->
<copy todir="${basedir}/cat">
<fileset dir="${junit.reports}/external/XQTS_1_0_3/cat"/>
</copy>
<java classname="org.exist.xquery.xqts.XQTS_To_junit">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="exist.jmxagent" value="" />
<!-- fixme! - jetty.port.jetty /ljo -->
<!-- fixme! - jetty.port.jetty /ljo -->
<sysproperty key="jetty.port" value="${jetty.port}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl}" />
<classpath refid="classpath.core"/>
Expand Down Expand Up @@ -478,7 +475,7 @@
<java classname="org.exist.xslt.XSLTStoJUnit">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="exist.jmxagent" value="" />
<!-- fixme! - jetty.port.jetty /ljo -->
<!-- fixme! - jetty.port.jetty /ljo -->
<sysproperty key="jetty.port" value="${jetty.port}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl}" />
<classpath refid="classpath.core"/>
Expand Down Expand Up @@ -520,7 +517,7 @@
<junit haltonfailure="${junit.haltonfailure}" haltonerror="${junit.haltonerror}" printsummary="on" showoutput="${junit.output}" fork="yes" maxmemory="${junit.forked.VM.maxmemory.external}">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="java.util.logging.manager" value="org.apache.logging.log4j.jul.LogManager"/>
<!-- fixme! - jetty.port.jetty /ljo -->
<!-- fixme! - jetty.port.jetty /ljo -->
<sysproperty key="jetty.port" value="${jetty.port}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl}" />
<classpath refid="classpath.core"/>
Expand All @@ -547,7 +544,7 @@
<junit haltonfailure="${junit.haltonfailure}" haltonerror="${junit.haltonerror}" printsummary="on" showoutput="${junit.output}" fork="yes" maxmemory="${junit.forked.VM.maxmemory.external}">
<sysproperty key="exist.home" value="${basedir}" />
<sysproperty key="java.util.logging.manager" value="org.apache.logging.log4j.jul.LogManager"/>
<!-- fixme! - jetty.port.jetty /ljo -->
<!-- fixme! - jetty.port.jetty /ljo -->
<sysproperty key="jetty.port" value="${jetty.port}" />
<sysproperty key="jetty.port.ssl" value="${jetty.port.ssl}" />
<classpath refid="classpath.core"/>
Expand Down
2 changes: 1 addition & 1 deletion conf.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@
- match-tagging-elements:
the database can highlight matches in the text content of a node by
tagging the matching text string with <exist:match>. Clearly, this
only works for XPath expressions using the fulltext index.
only works for XPath expressions using the some indexes.
Set the parameter to "yes" to enable this feature.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ public class ConcurrencyTest {
private static String COLLECTION_CONFIG1 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index>" +
" <fulltext default=\"none\">" +
" </fulltext>" +
" <lucene>" +
" <text qname=\"LINE\"/>" +
" <text qname=\"SPEAKER\"/>" +
Expand All @@ -69,11 +67,7 @@ public void store() {

for (int i = 0; i < 10; i++) {
final String name = "thread" + i;
Runnable run = new Runnable() {
public void run() {
storeRemoveDocs(name);
}
};
Runnable run = () -> storeRemoveDocs(name);
executor.submit(run);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
Expand Down Expand Up @@ -157,8 +155,6 @@ public class LuceneIndexTest {
private static final String COLLECTION_CONFIG1 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index>" +
" <fulltext default=\"none\">" +
" </fulltext>" +
" <lucene>" +
" <analyzer class=\"org.apache.lucene.analysis.core.SimpleAnalyzer\"/>" +
" <text match=\"/section/p\"/>" +
Expand All @@ -173,12 +169,6 @@ public class LuceneIndexTest {
private static final String COLLECTION_CONFIG2 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index>" +
" <fulltext default=\"none\">" +
" <create qname=\"item\"/>" +
" <create qname=\"description\"/>" +
" <create qname=\"condition\"/>" +
" <create qname=\"@attr\"/>" +
" </fulltext>" +
" <lucene>" +
" <text qname=\"item\"/>" +
" <text match=\"//description\"/>" +
Expand All @@ -191,8 +181,6 @@ public class LuceneIndexTest {
private static final String COLLECTION_CONFIG3 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index>" +
" <fulltext default=\"none\">" +
" </fulltext>" +
" <lucene>" +
" <analyzer id=\"whitespace\" class=\"org.apache.lucene.analysis.core.WhitespaceAnalyzer\"/>" +
" <text match=\"/section/head\" analyzer=\"whitespace\"/>" +
Expand All @@ -204,8 +192,6 @@ public class LuceneIndexTest {
private static final String COLLECTION_CONFIG4 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index>" +
" <fulltext default=\"none\">" +
" </fulltext>" +
" <lucene>" +
" <text match=\"/test/a\"/>" +
" <text match=\"/test/b/*\"/>" +
Expand All @@ -216,8 +202,6 @@ public class LuceneIndexTest {
private static final String COLLECTION_CONFIG5 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index xmlns:tei=\"http://www.tei-c.org/ns/1.0\">" +
" <fulltext default=\"none\" attributes=\"no\">" +
" </fulltext>" +
" <lucene>" +
" <text qname=\"article\">" +
" <ignore qname=\"note\"/>" +
Expand All @@ -237,20 +221,16 @@ public class LuceneIndexTest {
private static final String COLLECTION_CONFIG6 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index xmlns:tei=\"http://www.tei-c.org/ns/1.0\">" +
" <fulltext default=\"none\" attributes=\"no\">" +
" </fulltext>" +
" <lucene>" +
" <text qname=\"b\"/>" +
" <text qname=\"c\" boost=\"2.0\"/>" +
" </lucene>" +
" </index>" +
"</collection>";

private static final String COLLECTION_CONFIG7 =
private static final String COLLECTION_CONFIG7 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index xmlns:tei=\"http://www.tei-c.org/ns/1.0\">" +
" <fulltext default=\"none\" attributes=\"no\">" +
" </fulltext>" +
" <lucene>" +
" <text qname='c'>" +
" <has-attribute qname='att' boost='30'/>" +
Expand All @@ -268,13 +248,11 @@ public class LuceneIndexTest {
" </index>" +
"</collection>";

private static final String COLLECTION_CONFIG8 =
private static final String COLLECTION_CONFIG8 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index xmlns:tei=\"http://www.tei-c.org/ns/1.0\">" +
" <fulltext default=\"none\" attributes=\"no\">" +
" </fulltext>" +
" <lucene>" +
" <analyzer class=\"org.apache.lucene.analysis.standard.StandardAnalyzer\"/>" +
" <analyzer class=\"org.apache.lucene.analysis.standard.StandardAnalyzer\"/>" +
" <text qname=\"tei:p\"/>" +
" </lucene>" +
" </index>" +
Expand Down
Loading

0 comments on commit 09856fc

Please sign in to comment.