Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

migration to Solr 4.5.0

Michael Peter Christen21aa6a032144
diff --git a/.classpath b/.classpath
index b27797779..a113c5019 100644
--- a/.classpath
+++ b/.classpath
@@ -50,27 +50,27 @@
<classpathentry kind="lib" path="lib/httpmime-4.3.jar"/>
<classpathentry kind="lib" path="lib/noggit-0.5.jar"/>
<classpathentry kind="lib" path="lib/metadata-extractor-2.6.2.jar"/>
- <classpathentry kind="lib" path="lib/lucene-analyzers-common-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-analyzers-phonetic-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-classification-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-codecs-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-core-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-facet-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-grouping-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-highlighter-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-join-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-memory-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-misc-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-queries-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-queryparser-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-spatial-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-suggest-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/solr-core-4.4.0.jar"/>
- <classpathentry kind="lib" path="lib/solr-solrj-4.4.0.jar"/>
<classpathentry kind="lib" path="lib/jcifs-1.3.17.jar"/>
<classpathentry kind="lib" path="lib/fontbox-1.8.2.jar"/>
<classpathentry kind="lib" path="lib/jempbox-1.8.2.jar"/>
<classpathentry kind="lib" path="lib/pdfbox-1.8.2.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-analyzers-common-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-analyzers-phonetic-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-classification-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-codecs-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-core-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-facet-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-grouping-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-highlighter-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-join-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-memory-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-misc-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-queries-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-queryparser-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-spatial-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-suggest-4.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/solr-core-4.5.0.jar" sourcepath="/Volumes/Tres/noBackup/Downloads/solr-4.5.0/solr/core/src/java"/>
+ <classpathentry kind="lib" path="lib/solr-solrj-4.5.0.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="lib/icu4j-core.jar"/>
<classpathentry kind="lib" path="lib/htmllexer.jar"/>
diff --git a/addon/YaCy.app/Contents/Info.plist b/addon/YaCy.app/Contents/Info.plist
index 178fb54bb..a8c052187 100644
--- a/addon/YaCy.app/Contents/Info.plist
+++ b/addon/YaCy.app/Contents/Info.plist
@@ -68,21 +68,21 @@
<string>$JAVAROOT/lib/jsch-0.1.42.jar</string>
<string>$JAVAROOT/lib/json-simple-1.1.jar</string>
<string>$JAVAROOT/lib/log4j-over-slf4j-1.7.2.jar</string>
- <string>$JAVAROOT/lib/lucene-analyzers-common-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-analyzers-phonetic-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-classification-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-codecs-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-core-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-facet-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-grouping-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-highlighter-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-join-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-memory-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-misc-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-queries-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-queryparser-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-spatial-4.4.0.jar</string>
- <string>$JAVAROOT/lib/lucene-suggest-4.4.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-analyzers-common-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-analyzers-phonetic-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-classification-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-codecs-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-core-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-facet-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-grouping-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-highlighter-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-join-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-memory-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-misc-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-queries-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-queryparser-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-spatial-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-suggest-4.5.0.jar</string>
<string>$JAVAROOT/lib/metadata-extractor-2.6.2.jar</string>
<string>$JAVAROOT/lib/mysql-connector-java-5.1.12-bin.jar</string>
<string>$JAVAROOT/lib/noggit-0.5.jar</string>
@@ -93,8 +93,8 @@
<string>$JAVAROOT/lib/servlet-api-2.5-20081211.jar</string>
<string>$JAVAROOT/lib/slf4j-api-1.7.2.jar</string>
<string>$JAVAROOT/lib/slf4j-jdk14-1.7.2.jar</string>
- <string>$JAVAROOT/lib/solr-core-4.4.0.jar</string>
- <string>$JAVAROOT/lib/solr-solrj-4.4.0.jar</string>
+ <string>$JAVAROOT/lib/solr-core-4.5.0.jar</string>
+ <string>$JAVAROOT/lib/solr-solrj-4.5.0.jar</string>
<string>$JAVAROOT/lib/spatial4j-0.3.jar</string>
<string>$JAVAROOT/lib/webcat-0.1-swf.jar</string>
<string>$JAVAROOT/lib/wstx-asl-3.2.9.jar</string>
diff --git a/build.xml b/build.xml
index f7f4c90a1..eafad4e22 100644
--- a/build.xml
+++ b/build.xml
@@ -193,21 +193,21 @@
<pathelement location="${lib}/json-simple-1.1.jar" />
<pathelement location="${lib}/jsoup-1.6.3.jar" />
<pathelement location="${lib}/log4j-over-slf4j-1.7.2.jar" />
- <pathelement location="${lib}/lucene-analyzers-common-4.4.0.jar" />
- <pathelement location="${lib}/lucene-analyzers-phonetic-4.4.0.jar" />
- <pathelement location="${lib}/lucene-classification-4.4.0.jar" />
- <pathelement location="${lib}/lucene-codecs-4.4.0.jar" />
- <pathelement location="${lib}/lucene-core-4.4.0.jar" />
- <pathelement location="${lib}/lucene-facet-4.4.0.jar" />
- <pathelement location="${lib}/lucene-grouping-4.4.0.jar" />
- <pathelement location="${lib}/lucene-highlighter-4.4.0.jar" />
- <pathelement location="${lib}/lucene-join-4.4.0.jar" />
- <pathelement location="${lib}/lucene-memory-4.4.0.jar" />
- <pathelement location="${lib}/lucene-misc-4.4.0.jar" />
- <pathelement location="${lib}/lucene-queries-4.4.0.jar" />
- <pathelement location="${lib}/lucene-queryparser-4.4.0.jar" />
- <pathelement location="${lib}/lucene-spatial-4.4.0.jar" />
- <pathelement location="${lib}/lucene-suggest-4.4.0.jar" />
+ <pathelement location="${lib}/lucene-analyzers-common-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-analyzers-phonetic-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-classification-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-codecs-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-core-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-facet-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-grouping-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-highlighter-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-join-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-memory-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-misc-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-queries-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-queryparser-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-spatial-4.5.0.jar" />
+ <pathelement location="${lib}/lucene-suggest-4.5.0.jar" />
<pathelement location="${lib}/metadata-extractor-2.6.2.jar" />
<pathelement location="${lib}/mysql-connector-java-5.1.12-bin.jar" />
<pathelement location="${lib}/noggit-0.5.jar" />
@@ -218,8 +218,8 @@
<pathelement location="${lib}/servlet-api-2.5-20081211.jar" />
<pathelement location="${lib}/slf4j-api-1.7.2.jar" />
<pathelement location="${lib}/slf4j-jdk14-1.7.2.jar" />
- <pathelement location="${lib}/solr-core-4.4.0.jar" />
- <pathelement location="${lib}/solr-solrj-4.4.0.jar" />
+ <pathelement location="${lib}/solr-core-4.5.0.jar" />
+ <pathelement location="${lib}/solr-solrj-4.5.0.jar" />
<pathelement location="${lib}/spatial4j-0.3.jar" />
<pathelement location="${lib}/webcat-0.1-swf.jar" />
<pathelement location="${lib}/wstx-asl-3.2.9.jar" />
diff --git a/defaults/solr/solrconfig.xml b/defaults/solr/solrconfig.xml
index 4e9a622b9..1234dd0d3 100644
--- a/defaults/solr/solrconfig.xml
+++ b/defaults/solr/solrconfig.xml
@@ -35,7 +35,7 @@
that you fully re-index after changing this setting as it can
affect both how text is indexed and queried.
-->
- <luceneMatchVersion>4.4</luceneMatchVersion>
+ <luceneMatchVersion>4.5</luceneMatchVersion>
<!-- <lib/> directives can be used to instruct Solr to load an Jars
identified and use them to resolve any "plugins" specified in
diff --git a/lib/lucene-analyzers-common-4.4.0.jar b/lib/lucene-analyzers-common-4.5.0.jar
similarity index 89%
rename from lib/lucene-analyzers-common-4.4.0.jar
rename to lib/lucene-analyzers-common-4.5.0.jar
index 1784e5704..2ac54ac26 100644
Binary files a/lib/lucene-analyzers-common-4.4.0.jar and b/lib/lucene-analyzers-common-4.5.0.jar differ
diff --git a/lib/lucene-analyzers-phonetic-4.4.0.jar b/lib/lucene-analyzers-phonetic-4.5.0.jar
similarity index 90%
rename from lib/lucene-analyzers-phonetic-4.4.0.jar
rename to lib/lucene-analyzers-phonetic-4.5.0.jar
index dacf818a1..87f8d3415 100644
Binary files a/lib/lucene-analyzers-phonetic-4.4.0.jar and b/lib/lucene-analyzers-phonetic-4.5.0.jar differ
diff --git a/lib/lucene-classification-4.4.0.jar b/lib/lucene-classification-4.5.0.jar
similarity index 91%
rename from lib/lucene-classification-4.4.0.jar
rename to lib/lucene-classification-4.5.0.jar
index 5aa7e6982..26ad061ed 100644
Binary files a/lib/lucene-classification-4.4.0.jar and b/lib/lucene-classification-4.5.0.jar differ
diff --git a/lib/lucene-codecs-4.4.0.jar b/lib/lucene-codecs-4.4.0.jar
deleted file mode 100644
index 844444167..000000000
Binary files a/lib/lucene-codecs-4.4.0.jar and /dev/null differ
diff --git a/lib/lucene-codecs-4.5.0.jar b/lib/lucene-codecs-4.5.0.jar
new file mode 100644
index 000000000..3df158e9b
Binary files /dev/null and b/lib/lucene-codecs-4.5.0.jar differ
diff --git a/lib/lucene-core-4.4.0.jar b/lib/lucene-core-4.5.0.jar
similarity index 64%
rename from lib/lucene-core-4.4.0.jar
rename to lib/lucene-core-4.5.0.jar
index df4eae6da..e710cc776 100644
Binary files a/lib/lucene-core-4.4.0.jar and b/lib/lucene-core-4.5.0.jar differ
diff --git a/lib/lucene-facet-4.4.0.jar b/lib/lucene-facet-4.5.0.jar
similarity index 51%
rename from lib/lucene-facet-4.4.0.jar
rename to lib/lucene-facet-4.5.0.jar
index 17ac873fd..2d1f558c6 100644
Binary files a/lib/lucene-facet-4.4.0.jar and b/lib/lucene-facet-4.5.0.jar differ
diff --git a/lib/lucene-grouping-4.4.0.jar b/lib/lucene-grouping-4.5.0.jar
similarity index 88%
rename from lib/lucene-grouping-4.4.0.jar
rename to lib/lucene-grouping-4.5.0.jar
index de433151b..4e75486a3 100644
Binary files a/lib/lucene-grouping-4.4.0.jar and b/lib/lucene-grouping-4.5.0.jar differ
diff --git a/lib/lucene-highlighter-4.4.0.jar b/lib/lucene-highlighter-4.5.0.jar
similarity index 74%
rename from lib/lucene-highlighter-4.4.0.jar
rename to lib/lucene-highlighter-4.5.0.jar
index 69d342337..e7545d356 100644
Binary files a/lib/lucene-highlighter-4.4.0.jar and b/lib/lucene-highlighter-4.5.0.jar differ
diff --git a/lib/lucene-join-4.4.0.jar b/lib/lucene-join-4.5.0.jar
similarity index 62%
rename from lib/lucene-join-4.4.0.jar
rename to lib/lucene-join-4.5.0.jar
index aed5e4b03..b8e3ad7c4 100644
Binary files a/lib/lucene-join-4.4.0.jar and b/lib/lucene-join-4.5.0.jar differ
diff --git a/lib/lucene-memory-4.4.0.jar b/lib/lucene-memory-4.4.0.jar
deleted file mode 100644
index 74b547eea..000000000
Binary files a/lib/lucene-memory-4.4.0.jar and /dev/null differ
diff --git a/lib/lucene-memory-4.5.0.jar b/lib/lucene-memory-4.5.0.jar
new file mode 100644
index 000000000..76ab93ad1
Binary files /dev/null and b/lib/lucene-memory-4.5.0.jar differ
diff --git a/lib/lucene-misc-4.4.0.jar b/lib/lucene-misc-4.5.0.jar
similarity index 64%
rename from lib/lucene-misc-4.4.0.jar
rename to lib/lucene-misc-4.5.0.jar
index 874a5f0f9..586fb17c5 100644
Binary files a/lib/lucene-misc-4.4.0.jar and b/lib/lucene-misc-4.5.0.jar differ
diff --git a/lib/lucene-queries-4.4.0.jar b/lib/lucene-queries-4.5.0.jar
similarity index 74%
rename from lib/lucene-queries-4.4.0.jar
rename to lib/lucene-queries-4.5.0.jar
index 07f36be02..21a916d31 100644
Binary files a/lib/lucene-queries-4.4.0.jar and b/lib/lucene-queries-4.5.0.jar differ
diff --git a/lib/lucene-queryparser-4.4.0.jar b/lib/lucene-queryparser-4.5.0.jar
similarity index 90%
rename from lib/lucene-queryparser-4.4.0.jar
rename to lib/lucene-queryparser-4.5.0.jar
index b28364806..fb2c9179e 100644
Binary files a/lib/lucene-queryparser-4.4.0.jar and b/lib/lucene-queryparser-4.5.0.jar differ
diff --git a/lib/lucene-spatial-4.4.0.jar b/lib/lucene-spatial-4.5.0.jar
similarity index 67%
rename from lib/lucene-spatial-4.4.0.jar
rename to lib/lucene-spatial-4.5.0.jar
index b49473634..a23813033 100644
Binary files a/lib/lucene-spatial-4.4.0.jar and b/lib/lucene-spatial-4.5.0.jar differ
diff --git a/lib/lucene-suggest-4.4.0.jar b/lib/lucene-suggest-4.5.0.jar
similarity index 70%
rename from lib/lucene-suggest-4.4.0.jar
rename to lib/lucene-suggest-4.5.0.jar
index 1f4a9cf50..d80395e74 100644
Binary files a/lib/lucene-suggest-4.4.0.jar and b/lib/lucene-suggest-4.5.0.jar differ
diff --git a/lib/solr-core-4.4.0.jar b/lib/solr-core-4.5.0.jar
similarity index 67%
rename from lib/solr-core-4.4.0.jar
rename to lib/solr-core-4.5.0.jar
index 54ae931d9..7704e1c17 100644
Binary files a/lib/solr-core-4.4.0.jar and b/lib/solr-core-4.5.0.jar differ
diff --git a/lib/solr-solrj-4.4.0.License b/lib/solr-solrj-4.5.0.License
similarity index 100%
rename from lib/solr-solrj-4.4.0.License
rename to lib/solr-solrj-4.5.0.License
diff --git a/lib/solr-solrj-4.4.0.jar b/lib/solr-solrj-4.5.0.jar
similarity index 67%
rename from lib/solr-solrj-4.4.0.jar
rename to lib/solr-solrj-4.5.0.jar
index e8bc1e45e..c45dd589a 100644
Binary files a/lib/solr-solrj-4.4.0.jar and b/lib/solr-solrj-4.5.0.jar differ
diff --git a/source/net/yacy/search/index/Fulltext.java b/source/net/yacy/search/index/Fulltext.java
index f3496e72f..d9854fd65 100644
--- a/source/net/yacy/search/index/Fulltext.java
+++ b/source/net/yacy/search/index/Fulltext.java
@@ -81,12 +81,11 @@ import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrInputDocument;
import org.apache.lucene.util.Version;
-import org.apache.solr.core.CoreContainer;
public final class Fulltext {
- private static final String SOLR_PATH = "solr_44"; // the number should be identical to the number in the property luceneMatchVersion in solrconfig.xml
- private static final String SOLR_OLD_PATH[] = new String[]{"solr_36", "solr_40"};
+ private static final String SOLR_PATH = "solr_45"; // the number should be identical to the number in the property luceneMatchVersion in solrconfig.xml
+ private static final String SOLR_OLD_PATH[] = new String[]{"solr_36", "solr_40", "solr_44"};
// class objects
private final File segmentPath;
@@ -167,7 +166,6 @@ public final class Fulltext {
File oldLocation = new File(this.segmentPath, oldVersion);
if (oldLocation.exists()) oldLocation.renameTo(solrLocation);
}
- assert CoreContainer.DEFAULT_DEFAULT_CORE_NAME.equals(CollectionSchema.CORE_NAME); // check that solr and we use the same default core name
EmbeddedInstance localCollectionInstance = new EmbeddedInstance(new File(new File(Switchboard.getSwitchboard().appPath, "defaults"), "solr"), solrLocation, CollectionSchema.CORE_NAME, new String[]{CollectionSchema.CORE_NAME, WebgraphSchema.CORE_NAME});
EmbeddedSolrConnector localCollectionConnector = new EmbeddedSolrConnector(localCollectionInstance);
diff --git a/source/net/yacy/search/schema/CollectionSchema.java b/source/net/yacy/search/schema/CollectionSchema.java
index ccd75f343..f3c7a968e 100644
--- a/source/net/yacy/search/schema/CollectionSchema.java
+++ b/source/net/yacy/search/schema/CollectionSchema.java
@@ -214,7 +214,7 @@ public enum CollectionSchema implements SchemaDeclaration {
ext_title_txt(SolrType.text_general, true, true, true, false, false, "names matching title expressions"),
ext_title_val(SolrType.num_integer, true, true, true, false, false, "number of matching title expressions");
- public final static String CORE_NAME = "collection1";
+ public final static String CORE_NAME = "collection1"; // this was the default core name up to Solr 4.4.0. This default name was stored in CoreContainer.DEFAULT_DEFAULT_CORE_NAME but was removed in Solr 4.5.0
public final static String VOCABULARY_PREFIX = "vocabulary_";
public final static String VOCABULARY_SUFFIX = "_sxt";