Skip to content

Commit

Permalink
Upgrade finished to 6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
romanchyla committed Jan 25, 2017
1 parent 637ca6a commit 0c434b6
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 28 deletions.
4 changes: 1 addition & 3 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@
<classpathentry kind="lib" path="contrib/antlrqueryparser/lib/antlr-2.7.7.jar"/>
<classpathentry kind="lib" path="contrib/antlrqueryparser/lib/stringtemplate-3.2.1.jar"/>
<classpathentry kind="lib" path="contrib/adsabs/lib/jython-standalone-2.7-b1.jar"/>
<classpathentry kind="lib" path="/dvt/luke-6.1/target/luke-with-deps.jar" sourcepath="/apache-solr-63"/>
<classpathentry kind="lib" path="contrib/antlrqueryparser/lib/antlr-3.5.2.jar"/>
<classpathentry kind="lib" path="contrib/antlrqueryparser/lib/antlr-runtime-3.5.2.jar"/>
<classpathentry kind="lib" path="contrib/antlrqueryparser/lib/gunit-3.5.2.jar"/>
<classpathentry kind="lib" path="contrib/antlrqueryparser/lib/hamcrest-core-1.1.jar"/>
<classpathentry kind="lib" path="contrib/antlrqueryparser/lib/ST4-4.0.8.jar"/>
<classpathentry kind="lib" path="contrib/adsabs/extra-lib/luke-4.0.0-BETA.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/apache-solr-63"/>
<classpathentry kind="lib" path="build/solrjars-extracted/lucene/lucene-analyzers-common-6.3.0-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="build/solrjars-extracted/lucene/lucene-analyzers-icu-6.3.0-SNAPSHOT.jar"/>
Expand Down Expand Up @@ -134,6 +132,6 @@
<classpathentry kind="lib" path="build/solrjars-extracted/solr/solrj-lib/woodstox-core-asl-4.4.1.jar"/>
<classpathentry kind="lib" path="build/solrjars-extracted/solr/test-framework/lib/junit4-ant-2.4.0.jar"/>
<classpathentry kind="lib" path="build/solrjars-extracted/solr/test-framework/lib/randomizedtesting-runner-2.4.0.jar"/>
<classpathentry kind="lib" path="lib/luke-with-deps.jar"/>
<classpathentry kind="lib" path="lib/luke-4.0.0-BETA.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.apache.lucene.analysis.tokenattributes.TypeAttribute;
import org.apache.lucene.analysis.util.CharArraySet;
import org.apache.lucene.analysis.CharArraySet;
import org.apache.lucene.util.ArrayUtil;
import org.apache.lucene.util.AttributeSource;
import org.apache.lucene.util.InPlaceMergeSorter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import org.apache.lucene.analysis.TokenFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.util.CharArraySet;
import org.apache.lucene.analysis.CharArraySet;
import org.apache.lucene.analysis.util.ResourceLoader;
import org.apache.lucene.analysis.util.ResourceLoaderAware;
import org.apache.lucene.analysis.util.TokenFilterFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public DocIdSetIterator iterator() {
@Override
public int docID() {
if (idx < 0) {
return -1;
return NO_MORE_DOCS;
} else if (idx < hits.size()) {
return doc;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.getopt.luke.GrowableStringArray;
import org.junit.BeforeClass;


public class MontySolrQueryTestCase extends MontySolrAbstractTestCase {

protected static AqpTestAbstractCase tp = new AqpTestAbstractCase() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void testDateRanges() throws Exception {
assertQueryEquals("2000-", null, "date:[2000 TO \\*]");

// i don't think we should try to guess this as a date
assertQueryEquals("2011", null, "");
assertQueryEquals("2011", null, "MatchNoDocsQuery(\"\")");
assertQueryEquals("2011", wsa, "2011");

}
Expand Down Expand Up @@ -261,7 +261,7 @@ public void testModifiers() throws Exception {
// this is an example of how complex the query parsing can be, and impossible
// without a powerful builder (this would just be unthinkable with the standard
// lucene parser and impossible with the invenio parser)
assertQueryEquals("#5", null, "");
assertQueryEquals("#5", null, "MatchNoDocsQuery(\"\")");
assertQueryEquals("#(request synonyms 5)", null, "+request +synonyms");


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ public void testAuthorParsingUseCases() throws Exception {
// what happens we receive very long string (non-author thing)
testAuthorQuery(
"\"purpose of this review is to bridge the gap between\"",
"",
"MatchNoDocsQuery(\"\")",
"//*[@numFound='0']"
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public void testStopwordsParsing() throws Exception {
assertStopQueryEquals("one stop", "b:one t:one");
assertStopQueryEquals("one (stop)", "b:one t:one");
assertStopQueryEquals("one ((stop))", "b:one t:one");
assertStopQueryEquals("stop", "");
assertStopQueryEquals("(stop)", "");
assertStopQueryEquals("((stop))", "");
assertStopQueryEquals("stop", "MatchNoDocsQuery(\"\")");
assertStopQueryEquals("(stop)", "MatchNoDocsQuery(\"\")");
assertStopQueryEquals("((stop))", "MatchNoDocsQuery(\"\")");
}

// verify parsing of query using a stopping analyzer
Expand All @@ -80,7 +80,7 @@ private void assertStopQueryEquals(String qtxt, String expectedRes)
// The lucene (for mysterious) reasons decide to output
// boolean query; so smarter qparsers have to work around
// the dum engineers...
if (expectedRes.equals("") && q.toString().trim().equals(""))
if (expectedRes.equals("MatchNoDocsQuery(\"\")"))
return;

assertEquals(expectedRes, q.toString());
Expand Down Expand Up @@ -220,7 +220,7 @@ public void testStaticMethod1() throws Exception {

String[] queries6 = { "((+stop))", "+((stop))" };
q = AqpQueryParserUtil.parse(qp, queries6, fields);
assertEquals(" ", q.toString());
assertEquals("MatchNoDocsQuery(\"\") MatchNoDocsQuery(\"\")", q.toString());

String[] queries7 = { "one ((+stop)) +more", "+((stop)) +two" };
q = AqpQueryParserUtil.parse(qp, queries7, fields);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public void testSlop() throws Exception {

public void testNumber() throws Exception {
// The numbers go away because SimpleAnalzyer ignores them
assertQueryEquals("3", null, "");
assertQueryEquals("3", null, "MatchNoDocsQuery(\"\")");
assertQueryEquals("term 1.0 1 2", null, "term");
assertQueryEquals("term term1 term2", null, "term term term");

Expand Down Expand Up @@ -516,14 +516,14 @@ public void testQPA() throws Exception {
assertQueryEquals("term AND NOT phrase term", qpAnalyzer,
"(+term -(phrase1 phrase2)) term");

assertQueryEquals("stop^3", qpAnalyzer, "");
assertQueryEquals("stop", qpAnalyzer, "");
assertQueryEquals("(stop)^3", qpAnalyzer, "");
assertQueryEquals("((stop))^3", qpAnalyzer, "");
assertQueryEquals("(stop^3)", qpAnalyzer, "");
assertQueryEquals("((stop)^3)", qpAnalyzer, "");
assertQueryEquals("(stop)", qpAnalyzer, "");
assertQueryEquals("((stop))", qpAnalyzer, "");
assertQueryEquals("stop^3", qpAnalyzer, "MatchNoDocsQuery(\"\")");
assertQueryEquals("stop", qpAnalyzer, "MatchNoDocsQuery(\"\")");
assertQueryEquals("(stop)^3", qpAnalyzer, "MatchNoDocsQuery(\"\")");
assertQueryEquals("((stop))^3", qpAnalyzer, "MatchNoDocsQuery(\"\")");
assertQueryEquals("(stop^3)", qpAnalyzer, "MatchNoDocsQuery(\"\")");
assertQueryEquals("((stop)^3)", qpAnalyzer, "MatchNoDocsQuery(\"\")");
assertQueryEquals("(stop)", qpAnalyzer, "MatchNoDocsQuery(\"\")");
assertQueryEquals("((stop))", qpAnalyzer, "MatchNoDocsQuery(\"\")");
assertTrue(getQuery("term term term", qpAnalyzer) instanceof BooleanQuery);
assertTrue(getQuery("term +stop", qpAnalyzer) instanceof TermQuery);
}
Expand Down Expand Up @@ -838,7 +838,7 @@ public void testBoost() throws Exception {
q = qp2.parse("the^3", "field");
// "the" is a stop word so the result is an empty query:
assertNotNull(q);
assertEquals("", q.toString());
assertEquals("MatchNoDocsQuery(\"\")", q.toString());
assertEquals(q.getClass(), MatchNoDocsQuery.class);
}

Expand Down
2 changes: 0 additions & 2 deletions contrib/examples/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@
the example, so that it can run without anything
else -->

<unzip src="${build.dir}/${example.name}/webapps/solr.war" dest="${build.dir}/${example.name}/solrwar" overwrite="off"/>

<path id="examples.classpath">
<fileset dir="${build.dir}/${example.name}/">
<include name="solrwar/WEB-INF/lib/**/*.jar" />
Expand Down
2 changes: 1 addition & 1 deletion contrib/upstream-include.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<delete dir="${include.location}" followsymlinks="false" removenotfollowedsymlinks="true"/>
</target>

<!-- link to upstream ant targets -->
<!-- link to upstream ant targets has to be defined inside the parent build.xml (that is importing us) -->
<target name="test" depends="link-upstream">
<ant target="test" dir="${include.location}"
inheritall="false">
Expand Down
Binary file removed lib/luke-4.0.0-BETA.jar
Binary file not shown.
Binary file added lib/luke-with-deps.jar
Binary file not shown.

0 comments on commit 0c434b6

Please sign in to comment.