Skip to content

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

upgrade to solr 4.2.1

Michael Peter Christencf0acd2cb4e9
diff --git a/.classpath b/.classpath
index 9e7f328b6..5e9634362 100644
--- a/.classpath
+++ b/.classpath
@@ -50,23 +50,26 @@
<classpathentry kind="lib" path="lib/jcl-over-slf4j-1.7.2.jar"/>
<classpathentry kind="lib" path="lib/slf4j-api-1.7.2.jar"/>
<classpathentry kind="lib" path="lib/zookeeper-3.4.5.jar"/>
- <classpathentry kind="lib" path="lib/solr-core-4.1.0.jar" sourcepath="/Users/admin/Development/sourcecode/solr-4.1.0/src/java"/>
- <classpathentry kind="lib" path="lib/solr-solrj-4.1.0.jar" sourcepath="/Users/admin/Development/sourcecode/solr-4.1.0/src/java"/>
- <classpathentry kind="lib" path="lib/lucene-analyzers-common-4.1.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-analyzers-phonetic-4.1.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-core-4.1.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-grouping-4.1.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-highlighter-4.1.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-memory-4.1.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-misc-4.1.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-queries-4.1.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-queryparser-4.1.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-spatial-4.1.0.jar"/>
- <classpathentry kind="lib" path="lib/lucene-suggest-4.1.0.jar"/>
<classpathentry kind="lib" path="lib/guava-13.0.1.jar"/>
<classpathentry kind="lib" path="lib/wstx-asl-3.2.9.jar"/>
<classpathentry kind="lib" path="lib/slf4j-jdk14-1.7.2.jar"/>
<classpathentry kind="lib" path="lib/log4j-over-slf4j-1.7.2.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-analyzers-common-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-analyzers-phonetic-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-classification-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-core-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-facet-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-grouping-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-highlighter-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-join-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-memory-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-misc-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-queries-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-queryparser-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-spatial-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/lucene-suggest-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/solr-core-4.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/solr-solrj-4.2.1.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 930c8f981..09b971e93 100644
--- a/addon/YaCy.app/Contents/Info.plist
+++ b/addon/YaCy.app/Contents/Info.plist
@@ -69,17 +69,20 @@
<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.1.0.jar</string>
- <string>$JAVAROOT/lib/lucene-analyzers-phonetic-4.1.0.jar</string>
- <string>$JAVAROOT/lib/lucene-core-4.1.0.jar</string>
- <string>$JAVAROOT/lib/lucene-grouping-4.1.0.jar</string>
- <string>$JAVAROOT/lib/lucene-highlighter-4.1.0.jar</string>
- <string>$JAVAROOT/lib/lucene-memory-4.1.0.jar</string>
- <string>$JAVAROOT/lib/lucene-misc-4.1.0.jar</string>
- <string>$JAVAROOT/lib/lucene-queries-4.1.0.jar</string>
- <string>$JAVAROOT/lib/lucene-queryparser-4.1.0.jar</string>
- <string>$JAVAROOT/lib/lucene-spatial-4.1.0.jar</string>
- <string>$JAVAROOT/lib/lucene-suggest-4.1.0.jar</string>
+ <string>$JAVAROOT/lib/lucene-analyzers-common-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-analyzers-phonetic-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-classification-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-core-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-facet-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-grouping-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-highlighter-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-join-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-memory-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-misc-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-queries-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-queryparser-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-spatial-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/lucene-suggest-4.2.1.jar</string>
<string>$JAVAROOT/lib/metadata-extractor-2.4.0-beta-1.jar</string>
<string>$JAVAROOT/lib/mysql-connector-java-5.1.12-bin.jar</string>
<string>$JAVAROOT/lib/pdfbox-1.7.1.jar</string>
@@ -89,8 +92,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.1.0.jar</string>
- <string>$JAVAROOT/lib/solr-solrj-4.1.0.jar</string>
+ <string>$JAVAROOT/lib/solr-core-4.2.1.jar</string>
+ <string>$JAVAROOT/lib/solr-solrj-4.2.1.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 6eec86ce6..e78a803b3 100644
--- a/build.xml
+++ b/build.xml
@@ -189,17 +189,20 @@
<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.1.0.jar" />
- <pathelement location="${lib}/lucene-analyzers-phonetic-4.1.0.jar" />
- <pathelement location="${lib}/lucene-core-4.1.0.jar" />
- <pathelement location="${lib}/lucene-grouping-4.1.0.jar" />
- <pathelement location="${lib}/lucene-highlighter-4.1.0.jar" />
- <pathelement location="${lib}/lucene-memory-4.1.0.jar" />
- <pathelement location="${lib}/lucene-misc-4.1.0.jar" />
- <pathelement location="${lib}/lucene-queries-4.1.0.jar" />
- <pathelement location="${lib}/lucene-queryparser-4.1.0.jar" />
- <pathelement location="${lib}/lucene-spatial-4.1.0.jar" />
- <pathelement location="${lib}/lucene-suggest-4.1.0.jar" />
+ <pathelement location="${lib}/lucene-analyzers-common-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-analyzers-phonetic-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-classification-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-core-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-facet-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-grouping-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-highlighter-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-join-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-memory-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-misc-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-queries-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-queryparser-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-spatial-4.2.1.jar" />
+ <pathelement location="${lib}/lucene-suggest-4.2.1.jar" />
<pathelement location="${lib}/metadata-extractor-2.4.0-beta-1.jar" />
<pathelement location="${lib}/mysql-connector-java-5.1.12-bin.jar" />
<pathelement location="${lib}/pdfbox-1.7.1.jar" />
@@ -209,8 +212,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.1.0.jar" />
- <pathelement location="${lib}/solr-solrj-4.1.0.jar" />
+ <pathelement location="${lib}/solr-core-4.2.1.jar" />
+ <pathelement location="${lib}/solr-solrj-4.2.1.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/lib/lucene-analyzers-common-4.1.0.jar b/lib/lucene-analyzers-common-4.2.1.jar
similarity index 92%
rename from lib/lucene-analyzers-common-4.1.0.jar
rename to lib/lucene-analyzers-common-4.2.1.jar
index 1e3c507e3..48bc65adb 100644
Binary files a/lib/lucene-analyzers-common-4.1.0.jar and b/lib/lucene-analyzers-common-4.2.1.jar differ
diff --git a/lib/lucene-analyzers-phonetic-4.1.0.jar b/lib/lucene-analyzers-phonetic-4.2.1.jar
similarity index 89%
rename from lib/lucene-analyzers-phonetic-4.1.0.jar
rename to lib/lucene-analyzers-phonetic-4.2.1.jar
index dd673bc87..0ad2e5b59 100644
Binary files a/lib/lucene-analyzers-phonetic-4.1.0.jar and b/lib/lucene-analyzers-phonetic-4.2.1.jar differ
diff --git a/lib/lucene-classification-4.2.1.jar b/lib/lucene-classification-4.2.1.jar
new file mode 100644
index 000000000..61d9242cd
Binary files /dev/null and b/lib/lucene-classification-4.2.1.jar differ
diff --git a/lib/lucene-core-4.1.0.jar b/lib/lucene-core-4.2.1.jar
similarity index 54%
rename from lib/lucene-core-4.1.0.jar
rename to lib/lucene-core-4.2.1.jar
index 834aa8fc1..cf995ccaa 100644
Binary files a/lib/lucene-core-4.1.0.jar and b/lib/lucene-core-4.2.1.jar differ
diff --git a/lib/lucene-facet-4.2.1.jar b/lib/lucene-facet-4.2.1.jar
new file mode 100644
index 000000000..e9d29954c
Binary files /dev/null and b/lib/lucene-facet-4.2.1.jar differ
diff --git a/lib/lucene-grouping-4.1.0.jar b/lib/lucene-grouping-4.1.0.jar
deleted file mode 100644
index 1dd4bcbaf..000000000
Binary files a/lib/lucene-grouping-4.1.0.jar and /dev/null differ
diff --git a/lib/lucene-grouping-4.2.1.jar b/lib/lucene-grouping-4.2.1.jar
new file mode 100644
index 000000000..de5d49a06
Binary files /dev/null and b/lib/lucene-grouping-4.2.1.jar differ
diff --git a/lib/lucene-highlighter-4.1.0.jar b/lib/lucene-highlighter-4.2.1.jar
similarity index 53%
rename from lib/lucene-highlighter-4.1.0.jar
rename to lib/lucene-highlighter-4.2.1.jar
index 94222fc3e..670073ffc 100644
Binary files a/lib/lucene-highlighter-4.1.0.jar and b/lib/lucene-highlighter-4.2.1.jar differ
diff --git a/lib/lucene-join-4.2.1.jar b/lib/lucene-join-4.2.1.jar
new file mode 100644
index 000000000..ad23a6ad2
Binary files /dev/null and b/lib/lucene-join-4.2.1.jar differ
diff --git a/lib/lucene-memory-4.1.0.jar b/lib/lucene-memory-4.1.0.jar
deleted file mode 100644
index 3ddf657fe..000000000
Binary files a/lib/lucene-memory-4.1.0.jar and /dev/null differ
diff --git a/lib/lucene-memory-4.2.1.jar b/lib/lucene-memory-4.2.1.jar
new file mode 100644
index 000000000..3aaf9436e
Binary files /dev/null and b/lib/lucene-memory-4.2.1.jar differ
diff --git a/lib/lucene-misc-4.1.0.jar b/lib/lucene-misc-4.2.1.jar
similarity index 82%
rename from lib/lucene-misc-4.1.0.jar
rename to lib/lucene-misc-4.2.1.jar
index 2529dfb65..eae5c8317 100644
Binary files a/lib/lucene-misc-4.1.0.jar and b/lib/lucene-misc-4.2.1.jar differ
diff --git a/lib/lucene-queries-4.1.0.jar b/lib/lucene-queries-4.1.0.jar
deleted file mode 100644
index 2a5c4345d..000000000
Binary files a/lib/lucene-queries-4.1.0.jar and /dev/null differ
diff --git a/lib/lucene-queries-4.2.1.jar b/lib/lucene-queries-4.2.1.jar
new file mode 100644
index 000000000..ab7dd2044
Binary files /dev/null and b/lib/lucene-queries-4.2.1.jar differ
diff --git a/lib/lucene-queryparser-4.1.0.jar b/lib/lucene-queryparser-4.2.1.jar
similarity index 82%
rename from lib/lucene-queryparser-4.1.0.jar
rename to lib/lucene-queryparser-4.2.1.jar
index 72a2db916..c0e805063 100644
Binary files a/lib/lucene-queryparser-4.1.0.jar and b/lib/lucene-queryparser-4.2.1.jar differ
diff --git a/lib/lucene-spatial-4.1.0.jar b/lib/lucene-spatial-4.1.0.jar
deleted file mode 100644
index 3a6daf5a3..000000000
Binary files a/lib/lucene-spatial-4.1.0.jar and /dev/null differ
diff --git a/lib/lucene-spatial-4.2.1.jar b/lib/lucene-spatial-4.2.1.jar
new file mode 100644
index 000000000..b489c83fc
Binary files /dev/null and b/lib/lucene-spatial-4.2.1.jar differ
diff --git a/lib/lucene-suggest-4.1.0.jar b/lib/lucene-suggest-4.2.1.jar
similarity index 56%
rename from lib/lucene-suggest-4.1.0.jar
rename to lib/lucene-suggest-4.2.1.jar
index 176eab9f1..0eed2b2d4 100644
Binary files a/lib/lucene-suggest-4.1.0.jar and b/lib/lucene-suggest-4.2.1.jar differ
diff --git a/lib/solr-core-4.1.0.jar b/lib/solr-core-4.1.0.jar
deleted file mode 100644
index 8d558f8cf..000000000
Binary files a/lib/solr-core-4.1.0.jar and /dev/null differ
diff --git a/lib/solr-core-4.2.1.jar b/lib/solr-core-4.2.1.jar
new file mode 100644
index 000000000..14d2dbe28
Binary files /dev/null and b/lib/solr-core-4.2.1.jar differ
diff --git a/lib/solr-solrj-4.1.0.jar b/lib/solr-solrj-4.2.1.jar
similarity index 57%
rename from lib/solr-solrj-4.1.0.jar
rename to lib/solr-solrj-4.2.1.jar
index 1053e9495..c30432824 100644
Binary files a/lib/solr-solrj-4.1.0.jar and b/lib/solr-solrj-4.2.1.jar differ
diff --git a/lib/solr-core-4.1.0.License b/lib/solr.License
similarity index 100%
rename from lib/solr-core-4.1.0.License
rename to lib/solr.License
diff --git a/source/net/yacy/cora/federate/solr/responsewriter/EnhancedXMLResponseWriter.java b/source/net/yacy/cora/federate/solr/responsewriter/EnhancedXMLResponseWriter.java
index f6be6d8a2..d3ce0451f 100644
--- a/source/net/yacy/cora/federate/solr/responsewriter/EnhancedXMLResponseWriter.java
+++ b/source/net/yacy/cora/federate/solr/responsewriter/EnhancedXMLResponseWriter.java
@@ -37,7 +37,6 @@ import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.response.QueryResponseWriter;
import org.apache.solr.response.ResultContext;
import org.apache.solr.response.SolrQueryResponse;
-import org.apache.solr.schema.DateField;
import org.apache.solr.schema.FieldType;
import org.apache.solr.schema.IndexSchema;
import org.apache.solr.schema.SchemaField;
@@ -177,6 +176,7 @@ public class EnhancedXMLResponseWriter implements QueryResponseWriter {
writer.write(lb);
}
+ @SuppressWarnings("deprecation")
private static void writeField(final Writer writer, final FieldType type, final String name, final String value) throws IOException {
String typeName = type.getTypeName();
if (typeName.equals(SolrType.text_general.printName()) ||
@@ -190,7 +190,7 @@ public class EnhancedXMLResponseWriter implements QueryResponseWriter {
} else if (typeName.equals(SolrType.num_long.printName())) {
writeTag(writer, "long", name, value, true);
} else if (typeName.equals(SolrType.date.printName())) {
- writeTag(writer, "date", name, DateField.formatExternal(new Date(Long.parseLong(value))), true);
+ writeTag(writer, "date", name, org.apache.solr.schema.DateField.formatExternal(new Date(Long.parseLong(value))), true); // this is declared deprecated in solr 4.2.1 but is still used as done here
} else if (typeName.equals(SolrType.num_float.printName())) {
writeTag(writer, "float", name, value, true);
} else if (typeName.equals(SolrType.num_double.printName())) {
diff --git a/source/net/yacy/search/query/QueryParams.java b/source/net/yacy/search/query/QueryParams.java
index ae6f28483..e400bc30b 100644
--- a/source/net/yacy/search/query/QueryParams.java
+++ b/source/net/yacy/search/query/QueryParams.java
@@ -38,6 +38,7 @@ import java.util.regex.PatternSyntaxException;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrQuery.ORDER;
+import org.apache.solr.client.solrj.SolrQuery.SortClause;
import net.yacy.cora.document.ASCII;
import net.yacy.cora.document.analysis.Classification;
@@ -509,7 +510,8 @@ public final class QueryParams {
// set ranking
if (this.ranking.coeff_date == RankingProfile.COEFF_MAX) {
// set a most-recent ordering
- params.setSortField(CollectionSchema.last_modified.getSolrFieldName(), ORDER.desc);
+ params.setSort(new SortClause(CollectionSchema.last_modified.getSolrFieldName(), SolrQuery.ORDER.desc));
+ //params.setSortField(CollectionSchema.last_modified.getSolrFieldName(), ORDER.desc); // deprecated in Solr 4.2
}
}
if (fq.length() > 0) {