Skip to content

Commit

Permalink
migrated solr from 8.9.0 to 8.11.2; activated also migration script. …
Browse files Browse the repository at this point in the history
…A YaCy index with solr 8.9.0 will automatically be migrated to 8.11.2. This is a preparation step to migrate to 9.0.0 soon.
  • Loading branch information
Orbiter committed Sep 1, 2023
1 parent 0089f23 commit 88cd17e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion defaults/solr/solrconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>8.8.1</luceneMatchVersion>
<luceneMatchVersion>8.11.2</luceneMatchVersion>

<!-- <lib/> directives can be used to instruct Solr to load any Jars
identified and use them to resolve any "plugins" specified in
Expand Down
31 changes: 16 additions & 15 deletions ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<dependency org="com.cybozu.labs" name="langdetect" rev="1.1-20120112" conf="compile->master"/>
<dependency org="com.drewnoakes" name="metadata-extractor" rev="2.18.0" />
<dependency org="com.fasterxml.jackson.core" name="jackson-databind" rev="2.13.5"/>
<dependency org="com.github.ben-manes.caffeine" name="caffeine" rev="3.1.8"/>
<dependency org="com.google.guava" name="guava" rev="28.0-jre" conf="compile->master"/>
<dependency org="com.ibm.icu" name="icu4j" rev="73.2"/>
<dependency org="com.jcraft" name="jsch" rev="0.1.55" />
Expand Down Expand Up @@ -41,24 +42,24 @@
<dependency org="org.apache.httpcomponents" name="httpclient" rev="4.5.12"/>
<dependency org="org.apache.httpcomponents" name="httpmime" rev="4.5.12"/>
<dependency org="org.apache.james" name="apache-mime4j" rev="0.6"/>
<dependency org="org.apache.lucene" name="lucene-analyzers-phonetic" rev="8.9.0" />
<dependency org="org.apache.lucene" name="lucene-backward-codecs" rev="8.9.0" />
<dependency org="org.apache.lucene" name="lucene-classification" rev="8.9.0" />
<dependency org="org.apache.lucene" name="lucene-codecs" rev="8.9.0" />
<dependency org="org.apache.lucene" name="lucene-grouping" rev="8.9.0" />
<dependency org="org.apache.lucene" name="lucene-highlighter" rev="8.9.0" />
<dependency org="org.apache.lucene" name="lucene-join" rev="8.9.0" />
<dependency org="org.apache.lucene" name="lucene-memory" rev="8.9.0" />
<dependency org="org.apache.lucene" name="lucene-misc" rev="8.9.0" />
<dependency org="org.apache.lucene" name="lucene-queries" rev="8.9.0" />
<dependency org="org.apache.lucene" name="lucene-queryparser" rev="8.9.0" conf="compile->master"/>
<dependency org="org.apache.lucene" name="lucene-spatial-extras" rev="8.9.0" conf="compile->master"/>
<dependency org="org.apache.lucene" name="lucene-suggest" rev="8.9.0"/>
<dependency org="org.apache.lucene" name="lucene-analyzers-phonetic" rev="8.11.2" />
<dependency org="org.apache.lucene" name="lucene-backward-codecs" rev="8.11.2" />
<dependency org="org.apache.lucene" name="lucene-classification" rev="8.11.2" />
<dependency org="org.apache.lucene" name="lucene-codecs" rev="8.11.2" />
<dependency org="org.apache.lucene" name="lucene-grouping" rev="8.11.2" />
<dependency org="org.apache.lucene" name="lucene-highlighter" rev="8.11.2" />
<dependency org="org.apache.lucene" name="lucene-join" rev="8.11.2" />
<dependency org="org.apache.lucene" name="lucene-memory" rev="8.11.2" />
<dependency org="org.apache.lucene" name="lucene-misc" rev="8.11.2" />
<dependency org="org.apache.lucene" name="lucene-queries" rev="8.11.2" />
<dependency org="org.apache.lucene" name="lucene-queryparser" rev="8.11.2" conf="compile->master"/>
<dependency org="org.apache.lucene" name="lucene-spatial-extras" rev="8.11.2" conf="compile->master"/>
<dependency org="org.apache.lucene" name="lucene-suggest" rev="8.11.2"/>
<dependency org="org.apache.pdfbox" name="pdfbox" rev="2.0.29" />
<dependency org="org.apache.poi" name="poi" rev="3.17" />
<dependency org="org.apache.poi" name="poi-scratchpad" rev="3.17" />
<dependency org="org.apache.solr" name="solr-core" rev="8.9.0" conf="compile->master"/>
<dependency org="org.apache.solr" name="solr-solrj" rev="8.9.0" conf="compile->master" />
<dependency org="org.apache.solr" name="solr-core" rev="8.11.2" conf="compile->master"/>
<dependency org="org.apache.solr" name="solr-solrj" rev="8.11.2" conf="compile->master" />
<dependency org="org.apache.zookeeper" name="zookeeper" rev="3.6.2" conf="compile->master" />
<dependency org="org.bitlet" name="weupnp" rev="0.1.4" />
<dependency org="org.bouncycastle" name="bcmail-jdk15on" rev="1.70" />
Expand Down
10 changes: 5 additions & 5 deletions source/net/yacy/search/index/Fulltext.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@

public final class Fulltext {

private static final String SOLR_PATH = "solr_8_8_1"; // 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", "solr_45", "solr_46", "solr_47", "solr_4_9", "solr_4_10", "solr_5_2", "solr_5_5", "solr_6_6"};
private static final String SOLR_PATH = "solr_8_11_2"; // 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", "solr_45", "solr_46", "solr_47",
"solr_4_9", "solr_4_10", "solr_5_2", "solr_5_5", "solr_6_6", "solr_8_8_1"};

// class objects
private final File segmentPath;
Expand Down Expand Up @@ -140,17 +142,15 @@ public void connectLocalSolr() throws IOException {
final File solrLocation = new File(this.segmentPath, SOLR_PATH);

// migrate old solr to new
/*
for (String oldVersion: SOLR_OLD_PATH) {
File oldLocation = new File(this.segmentPath, oldVersion);
if (oldLocation.exists()) {
if(!oldLocation.renameTo(solrLocation)) {
if (!oldLocation.renameTo(solrLocation)) {
ConcurrentLog.severe("Fulltext", "Failed renaming old Solr location ("
+ oldLocation.getAbsolutePath() + ") to new location : " + solrLocation.getAbsolutePath());
}
}
}
*/

final 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});
final SolrConfig config = localCollectionInstance.getDefaultCore().getSolrConfig();
Expand Down

0 comments on commit 88cd17e

Please sign in to comment.