Skip to content

Commit 1b86efc

Browse files
committed
Switching to Solr 5.3.1
1 parent d2d54cd commit 1b86efc

File tree

116 files changed

+1251
-16574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+1251
-16574
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
**/.settings
88
.pydevproject
99
**/.DS_Store
10+
**/.zip
11+
**/.tar
12+
**/.tgz

common/src/main/scripts/env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
export OODT_HOME=$LABCAS_HOME
44
export CATALINA_HOME=$LABCAS_HOME/apache-tomcat
55

6+
export SOLR_DIR=$LABCAS_HOME
67
export SOLR_HOME=$LABCAS_HOME/solr-home
78
export SOLR_DATA_DIR=$LABCAS_HOME/solr-index
8-
export CATALINA_OPTS='-Dsolr.solr.home=$SOLR_HOME -Dsolr.data.dir=$SOLR_DATA_DIR'
9-
export SOLR_URL=http://localhost:8080/solr/oodt-fm
9+
export SOLR_URL=http://localhost:8983/solr/oodt-fm
1010

1111
#export PGE_ROOT=$LABCAS_HOME/pges
1212

common/src/main/scripts/start.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ cd $OODT_HOME/cas-resource/bin
1919
cd $CATALINA_HOME/bin
2020
./catalina.sh start
2121

22+
# Solr
23+
cd $SOLR_DIR/solr/bin
24+
./solr start -p 8983 -s $SOLR_HOME
25+
2226
cd $LABCAS_HOME
2327

2428
echo ""
@@ -27,3 +31,4 @@ echo "Currently running LabCAS services:"
2731
echo "----------------------------------"
2832
ps -ef | grep oodt
2933
ps -ef | grep catalina
34+
ps -ef | grep solr

common/src/main/scripts/stop.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
# Stop all LabCAS backend services
55

6+
# Solr
7+
cd $SOLR_DIR/solr/bin
8+
./solr stop -p 8983
9+
610
# Apache Tomcat
711
cd $CATALINA_HOME/bin
812
./catalina.sh stop

oodt/src/main/resources/filemgr.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ org.apache.oodt.cas.filemgr.catalog.lucene.writeLockTimeout.seconds=60
6969
org.apache.oodt.cas.filemgr.catalog.lucene.mergeFactor=20
7070

7171
# solr catalog configuration
72-
#org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8983/solr
73-
org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8080/solr
72+
org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8983/solr
73+
#org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8080/solr
7474
org.apache.oodt.cas.filemgr.catalog.solr.productSerializer=org.apache.oodt.cas.filemgr.catalog.solr.DefaultProductSerializer
7575
org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.UUIDProductIdGenerator
7676
#org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.NameProductIdGenerator

pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
<tomcat.dir>${env.LABCAS_HOME}</tomcat.dir>
3838

3939
<!-- Solr/Solrj version and configuration location -->
40-
<solr.version>4.9.1</solr.version>
40+
<solr.repo>http://apache.mirrors.lucidnetworks.net/lucene/solr</solr.repo>
41+
<solr.version>5.3.1</solr.version>
42+
<solr.dir>${env.LABCAS_HOME}</solr.dir>
4143
<solr.solr.home>${env.LABCAS_HOME}/solr-home</solr.solr.home>
4244
<solr.data.dir>${env.LABCAS_HOME}/solr-index</solr.data.dir>
4345
<solr-jars.version>1.3.0</solr-jars.version>

solr/pom.xml

Lines changed: 76 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
<?xml version="1.0"?>
2-
<!-- Author: Luca Cinquini Description: Maven descriptor that performs the following actions: 1. Downloads the Solr war file
3-
and copies it to the Tomcat distribution 2. -->
4-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
<!-- Author: Luca Cinquini -->
3+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
64

75
<modelVersion>4.0.0</modelVersion>
86

97
<artifactId>solr</artifactId>
108
<packaging>pom</packaging>
11-
<name>Apache Solr web application configured for LabCAS File Manager</name>
9+
<name>Apache Solr application configured for LabCAS File Manager</name>
1210

1311
<parent>
1412
<groupId>gov.nasa.jpl.edrn.labcas</groupId>
@@ -17,155 +15,127 @@
1715
<relativePath>../pom.xml</relativePath>
1816
</parent>
1917

20-
<!-- Solr webapp must be installed AFTER Tomcat is already installed -->
21-
<dependencies>
22-
<dependency>
23-
<groupId>gov.nasa.jpl.edrn.labcas</groupId>
24-
<artifactId>tomcat</artifactId>
25-
<version>${parent.version}</version>
26-
</dependency>
27-
</dependencies>
28-
2918
<build>
3019
<plugins>
3120

32-
<!-- download and install Solr web application into existing Tomcat installation including the needed logging jars -->
21+
<!-- download and install Solr full package (note: NOT available from Maven central) -->
3322
<plugin>
34-
<artifactId>maven-dependency-plugin</artifactId>
23+
<groupId>org.apache.maven.plugins</groupId>
24+
<artifactId>maven-antrun-plugin</artifactId>
3525
<executions>
3626
<execution>
37-
<id>install-solr</id>
27+
<id>download-solr</id>
3828
<phase>install</phase>
3929
<goals>
40-
<goal>copy</goal>
30+
<goal>run</goal>
4131
</goals>
4232
<configuration>
43-
<artifactItems>
44-
<artifactItem>
45-
<groupId>org.apache.solr</groupId>
46-
<artifactId>solr</artifactId>
47-
<version>${solr.version}</version>
48-
<type>war</type>
49-
<overWrite>true</overWrite>
50-
<outputDirectory>${install.dir}/apache-tomcat/webapps</outputDirectory>
51-
<destFileName>solr.war</destFileName>
52-
</artifactItem>
53-
<artifactItem>
54-
<groupId>org.slf4j</groupId>
55-
<artifactId>slf4j-api</artifactId>
56-
<version>${slf4j.version}</version>
57-
<type>jar</type>
58-
<outputDirectory>${install.dir}/apache-tomcat/lib</outputDirectory>
59-
</artifactItem>
60-
<artifactItem>
61-
<groupId>org.slf4j</groupId>
62-
<artifactId>jcl-over-slf4j</artifactId>
63-
<version>${slf4j.version}</version>
64-
<type>jar</type>
65-
<outputDirectory>${install.dir}/apache-tomcat/lib</outputDirectory>
66-
</artifactItem>
67-
<artifactItem>
68-
<groupId>org.slf4j</groupId>
69-
<artifactId>jul-to-slf4j</artifactId>
70-
<version>${slf4j.version}</version>
71-
<type>jar</type>
72-
<outputDirectory>${install.dir}/apache-tomcat/lib</outputDirectory>
73-
</artifactItem>
74-
<artifactItem>
75-
<groupId>org.slf4j</groupId>
76-
<artifactId>slf4j-log4j12</artifactId>
77-
<version>${slf4j.version}</version>
78-
<type>jar</type>
79-
<outputDirectory>${install.dir}/apache-tomcat/lib</outputDirectory>
80-
</artifactItem>
81-
<artifactItem>
82-
<groupId>log4j</groupId>
83-
<artifactId>log4j</artifactId>
84-
<version>${log4j.version}</version>
85-
<type>jar</type>
86-
<outputDirectory>${install.dir}/apache-tomcat/lib</outputDirectory>
87-
</artifactItem>
88-
</artifactItems>
33+
<target>
34+
<!-- run Ant "get" task to download the file -->
35+
<get src="${solr.repo}/${solr.version}/solr-${solr.version}.tgz" dest="." verbose="false" usetimestamp="true" />
36+
</target>
8937
</configuration>
9038
</execution>
91-
</executions>
92-
</plugin>
93-
94-
<plugin>
95-
<artifactId>maven-resources-plugin</artifactId>
96-
<executions>
97-
<!-- install customized log4j.properties into Tomcat -->
9839
<execution>
99-
<id>copy-log4j-properties</id>
40+
<id>unpack-solr</id>
10041
<phase>install</phase>
10142
<goals>
102-
<goal>copy-resources</goal>
43+
<goal>run</goal>
10344
</goals>
10445
<configuration>
105-
<outputDirectory>${install.dir}/apache-tomcat/lib</outputDirectory>
106-
<resources>
107-
<resource>
108-
<directory>${project.basedir}/src/main/resources</directory>
109-
<includes>
110-
<include>log4j.properties</include>
111-
</includes>
112-
</resource>
113-
</resources>
46+
<target>
47+
<!-- run Ant "untar" task to expand the file -->
48+
<untar src="./solr-${solr.version}.tgz" dest="${solr.dir}/" compression="gzip" overwrite="false" />
49+
</target>
11450
</configuration>
11551
</execution>
116-
<!-- create and configure the SOLR_HOME directory -->
52+
<execution>
53+
<id>chmod-solr</id>
54+
<phase>install</phase>
55+
<goals>
56+
<goal>run</goal>
57+
</goals>
58+
<configuration>
59+
<target>
60+
<!-- run Ant "chmod" task to make the start/stop script executable -->
61+
<chmod file="${solr.dir}/solr-${solr.version}/bin/solr" perm="a+x"/>
62+
</target>
63+
</configuration>
64+
</execution>
65+
11766
<execution>
118-
<id>copy-solr-xml</id>
67+
<id>symlink-solr</id>
11968
<phase>install</phase>
12069
<goals>
121-
<goal>copy-resources</goal>
70+
<goal>run</goal>
12271
</goals>
12372
<configuration>
124-
<outputDirectory>${solr.solr.home}</outputDirectory>
125-
<resources>
126-
<resource>
127-
<directory>${project.basedir}/src/main/resources</directory>
128-
<includes>
129-
<include>solr.xml</include>
130-
</includes>
131-
</resource>
132-
</resources>
73+
<target>
74+
<symlink resource="${solr.dir}/solr-${solr.version}" link="${solr.dir}/solr" overwrite="true" />
75+
</target>
13376
</configuration>
13477
</execution>
135-
<!-- copy src/main/config/* to SOLR_HOME/${solr.solr.core}/conf/. -->
78+
</executions>
79+
</plugin>
80+
81+
<!-- clone SOLR_HOME directory -->
82+
<plugin>
83+
<artifactId>maven-resources-plugin</artifactId>
84+
<executions>
13685
<execution>
137-
<id>copy-solr-config</id>
86+
<id>copy-solr-home</id>
13887
<phase>install</phase>
13988
<goals>
14089
<goal>copy-resources</goal>
14190
</goals>
14291
<configuration>
143-
<outputDirectory>${solr.solr.home}/oodt-fm/conf</outputDirectory>
92+
<outputDirectory>${solr.solr.home}</outputDirectory>
14493
<resources>
14594
<resource>
146-
<directory>${project.basedir}/src/main/config</directory>
95+
<directory>${project.basedir}/src/main/resources/solr-home</directory>
96+
<!-- enable filtering to replace value of ${solr.data.dir} in core.properties -->
97+
<filtering>true</filtering>
14798
</resource>
14899
</resources>
149100
</configuration>
150101
</execution>
151-
152102
</executions>
153103
</plugin>
154-
155-
<!-- clean up SOLR_HOME, SOLR_DATA_DIR -->
156-
<!-- <plugin>
104+
105+
<!-- clean up Solr installation -->
106+
<plugin>
157107
<artifactId>maven-clean-plugin</artifactId>
158108
<configuration>
159109
<filesets>
160110
<fileset>
161-
<directory>${solr.solr.home}</directory>
111+
<directory>${solr.dir}/solr-${solr.version}</directory>
162112
</fileset>
163-
<fileset>
113+
<!-- <fileset>
164114
<directory>${solr.data.dir}</directory>
165-
</fileset>
115+
</fileset> -->
116+
<!-- <fileset>
117+
<directory>${solr.data.dir}</directory>
118+
</fileset> -->
166119
</filesets>
167120
</configuration>
168-
</plugin> -->
121+
</plugin>
122+
<plugin>
123+
<artifactId>maven-antrun-plugin</artifactId>
124+
<executions>
125+
<execution>
126+
<phase>clean</phase>
127+
<goals>
128+
<goal>run</goal>
129+
</goals>
130+
<id>unsymlink-solr</id>
131+
<configuration>
132+
<target>
133+
<symlink action="delete" link="${solr.dir}/solr" />
134+
</target>
135+
</configuration>
136+
</execution>
137+
</executions>
138+
</plugin>
169139

170140
</plugins>
171141
</build>

solr/src/main/config/_schema_analysis_stopwords_english.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

solr/src/main/config/_schema_analysis_synonyms_english.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

solr/src/main/config/admin-extra.html

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)