Skip to content

Commit

Permalink
Simplified the example
Browse files Browse the repository at this point in the history
  • Loading branch information
romanchyla committed Oct 28, 2016
1 parent 34d6a56 commit bca7bff
Show file tree
Hide file tree
Showing 51 changed files with 326 additions and 357 deletions.
4 changes: 0 additions & 4 deletions contrib/adsabs/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@
<import file="../antlrqueryparser/build.xml" />


<target name="foo">
<echo>${include.path}</echo>
</target>

<target name="link-upstream" unless="${include.exists}">
<mkdir dir="${include.location}"/>
<symlink link="${include.location}/src" resource="${basedir}/src" failonerror="true"/>
Expand Down
6 changes: 3 additions & 3 deletions contrib/adsabs/src/test/org/adsabs/TestAdsAllFields.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ public class TestAdsAllFields extends MontySolrQueryTestCase {
@BeforeClass
public static void beforeClass() throws Exception {
makeResourcesVisible(Thread.currentThread().getContextClassLoader(), new String[] {
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1",
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1",
MontySolrSetup.getSolrHome() + "/example/solr/collection1"
});

System.setProperty("solr.allow.unsafe.resourceloading", "true");
schemaString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/schema.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/schema.xml";

configString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/solrconfig.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/solrconfig.xml";

initCore(configString, schemaString, MontySolrSetup.getSolrHome()
+ "/example/solr");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class TestCitationsSearch extends MontySolrAbstractTestCase {
@BeforeClass
public static void beforeClass() throws Exception {
makeResourcesVisible(Thread.currentThread().getContextClassLoader(), new String[] {
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1/conf",
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1/conf",
MontySolrSetup.getSolrHome() + "/example/solr/collection1/conf"
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ public class TestAdsabsTypeAffiliationText extends MontySolrQueryTestCase {
public static void beforeClass() throws Exception {

makeResourcesVisible(Thread.currentThread().getContextClassLoader(), new String[] {
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1",
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1",
MontySolrSetup.getSolrHome() + "/example/solr/collection1"
});

System.setProperty("solr.allow.unsafe.resourceloading", "true");


schemaString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/schema.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/schema.xml";

configString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/solrconfig.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/solrconfig.xml";

initCore(configString, schemaString, MontySolrSetup.getSolrHome()
+ "/example/solr");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ public class TestAdsabsTypeDateString extends MontySolrQueryTestCase {
public static void beforeClass() throws Exception {

makeResourcesVisible(Thread.currentThread().getContextClassLoader(), new String[] {
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1",
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1",
MontySolrSetup.getSolrHome() + "/example/solr/collection1"
});

System.setProperty("solr.allow.unsafe.resourceloading", "true");
schemaString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/schema.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/schema.xml";

configString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/solrconfig.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/solrconfig.xml";

initCore(configString, schemaString, MontySolrSetup.getSolrHome()
+ "/example/solr");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public class TestAdsabsTypeFulltextParsing extends MontySolrQueryTestCase {
public static void beforeClass() throws Exception {

makeResourcesVisible(Thread.currentThread().getContextClassLoader(),
new String[] {MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1",
new String[] {MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1",
MontySolrSetup.getSolrHome() + "/example/solr/collection1"
});

Expand All @@ -120,7 +120,7 @@ public static void beforeClass() throws Exception {


configString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/solrconfig.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/solrconfig.xml";

initCore(configString, schemaString, MontySolrSetup.getSolrHome() + "/example/solr");
}
Expand All @@ -133,7 +133,7 @@ public static String getSchemaFile() {
*/

String configFile = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/schema.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/schema.xml";

File newConfig;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ public class TestAdsabsTypeNormalizedStringAscii extends MontySolrQueryTestCase
public static void beforeClass() throws Exception {

makeResourcesVisible(Thread.currentThread().getContextClassLoader(), new String[] {
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1",
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1",
MontySolrSetup.getSolrHome() + "/example/solr/collection1"
});

System.setProperty("solr.allow.unsafe.resourceloading", "true");
schemaString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/schema.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/schema.xml";


configString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/solrconfig.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/solrconfig.xml";

initCore(configString, schemaString, MontySolrSetup.getSolrHome()
+ "/example/solr");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ public class TestAdsabsTypeNormalizedTextAscii extends MontySolrQueryTestCase {
public static void beforeClass() throws Exception {

makeResourcesVisible(Thread.currentThread().getContextClassLoader(),
new String[] {MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1",
new String[] {MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1",
MontySolrSetup.getSolrHome() + "/example/solr/collection1"
});

System.setProperty("solr.allow.unsafe.resourceloading", "true");
schemaString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/schema.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/schema.xml";


configString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/solrconfig.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/solrconfig.xml";

initCore(configString, schemaString, MontySolrSetup.getSolrHome()
+ "/example/solr");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public class TestAdsabsTypeAuthorParsing extends MontySolrQueryTestCase {
public static void beforeClass() throws Exception {

makeResourcesVisible(Thread.currentThread().getContextClassLoader(), new String[] {
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1",
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1",
MontySolrSetup.getSolrHome() + "/example/solr/collection1"
});

Expand All @@ -93,7 +93,7 @@ public static void beforeClass() throws Exception {


configString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/solrconfig.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/solrconfig.xml";

initCore(configString, schemaString, MontySolrSetup.getSolrHome()
+ "/example/solr");
Expand All @@ -106,7 +106,7 @@ public static String getSchemaFile() {
*/

String schemaConfig = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/schema.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/schema.xml";

File newConfig;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ public class TestBatchRequestHandler extends MontySolrQueryTestCase {
public static void beforeClass() throws Exception {

makeResourcesVisible(Thread.currentThread().getContextClassLoader(), new String[] {
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1",
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1",
MontySolrSetup.getSolrHome() + "/example/solr/collection1"
});

System.setProperty("solr.allow.unsafe.resourceloading", "true");
schemaString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/schema.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/schema.xml";

configString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/solrconfig.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/solrconfig.xml";

initCore(configString, schemaString, MontySolrSetup.getSolrHome()
+ "/example/solr");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class TestAqpAdsabsSolrSearch extends MontySolrQueryTestCase {
public static void beforeClass() throws Exception {

makeResourcesVisible(Thread.currentThread().getContextClassLoader(),
new String[]{MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1",
new String[]{MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1",
MontySolrSetup.getSolrHome() + "/example/solr/collection1"
});

Expand All @@ -58,7 +58,7 @@ public static void beforeClass() throws Exception {


configString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/solrconfig.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/solrconfig.xml";

initCore(configString, schemaString, MontySolrSetup.getSolrHome()
+ "/example/solr");
Expand All @@ -72,7 +72,7 @@ public static String getSchemaFile() {
*/

String configFile = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/schema.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/schema.xml";

File newConfig;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class TestAqpLuceneQParserPlugin extends MontySolrAbstractTestCase {
public static void beforeClass() throws Exception {

makeResourcesVisible(Thread.currentThread().getContextClassLoader(), new String[] {
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1/conf",
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1/conf",
MontySolrSetup.getSolrHome() + "/example/solr/collection1/conf"
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ public class TestSolrCitationQuery extends MontySolrQueryTestCase {
public static void beforeClass() throws Exception {

makeResourcesVisible(Thread.currentThread().getContextClassLoader(), new String[] {
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1/",
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1/",
MontySolrSetup.getSolrHome() + "/example/solr/collection1"
});

System.setProperty("solr.allow.unsafe.resourceloading", "true");
schemaString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/schema.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/schema.xml";

configString = MontySolrSetup.getMontySolrHome()
+ "/contrib/examples/adsabs/solr/collection1/solrconfig.xml";
+ "/contrib/examples/adsabs/server/solr/collection1/solrconfig.xml";

initCore(configString, schemaString, MontySolrSetup.getSolrHome() + "/example/solr");
}
Expand Down
2 changes: 1 addition & 1 deletion contrib/adsabs/src/test/perf/TestCreateQueries.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class TestCreateQueries extends MontySolrAbstractTestCase {
public static void beforeClass() throws Exception {

makeResourcesVisible(Thread.currentThread().getContextClassLoader(), new String[] {
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/solr/collection1/conf/",
MontySolrSetup.getMontySolrHome() + "/contrib/examples/adsabs/server/solr/collection1/conf/",
MontySolrSetup.getSolrHome() + "/example/solr/collection1/conf"
});

Expand Down
127 changes: 127 additions & 0 deletions contrib/examples/adsabs/bin/solr.in.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# By default the script will use JAVA_HOME to determine which java
# to use, but you can set a specific path for Solr to use without
# affecting other Java applications on your server/workstation.
#SOLR_JAVA_HOME=""

# Increase Java Heap as needed to support your indexing / query needs
#SOLR_HEAP="512m"

# Expert: If you want finer control over memory options, specify them directly
# Comment out SOLR_HEAP if you are using this though, that takes precedence
SOLR_JAVA_MEM="-d64 -Xmx2048m"

# Enable verbose GC logging
GC_LOG_OPTS="-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails \
-XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime"

# These GC settings have shown to work well for a number of common Solr workloads
GC_TUNE="-XX:NewRatio=3 \
-XX:SurvivorRatio=4 \
-XX:TargetSurvivorRatio=90 \
-XX:MaxTenuringThreshold=8 \
-XX:+UseConcMarkSweepGC \
-XX:+UseParNewGC \
-XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 \
-XX:+CMSScavengeBeforeRemark \
-XX:PretenureSizeThreshold=64m \
-XX:+UseCMSInitiatingOccupancyOnly \
-XX:CMSInitiatingOccupancyFraction=50 \
-XX:CMSMaxAbortablePrecleanTime=6000 \
-XX:+CMSParallelRemarkEnabled \
-XX:+ParallelRefProcEnabled"

# Set the ZooKeeper connection string if using an external ZooKeeper ensemble
# e.g. host1:2181,host2:2181/chroot
# Leave empty if not using SolrCloud
#ZK_HOST=""

# Set the ZooKeeper client timeout (for SolrCloud mode)
#ZK_CLIENT_TIMEOUT="15000"

# By default the start script uses "localhost"; override the hostname here
# for production SolrCloud environments to control the hostname exposed to cluster state
#SOLR_HOST="192.168.1.1"

# By default the start script uses UTC; override the timezone if needed
#SOLR_TIMEZONE="UTC"

# Set to true to activate the JMX RMI connector to allow remote JMX client applications
# to monitor the JVM hosting Solr; set to "false" to disable that behavior
# (false is recommended in production environments)
ENABLE_REMOTE_JMX_OPTS="false"

# The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here
# RMI_PORT=18983

# Set the thread stack size
SOLR_OPTS="$SOLR_OPTS -Xss256k"

# Anything you add to the SOLR_OPTS variable will be included in the java
# start command line as-is, in ADDITION to other options. If you specify the
# -a option on start script, those options will be appended as well. Examples:
#SOLR_OPTS="$SOLR_OPTS -Dsolr.autoSoftCommit.maxTime=3000"
#SOLR_OPTS="$SOLR_OPTS -Dsolr.autoCommit.maxTime=60000"
#SOLR_OPTS="$SOLR_OPTS -Dsolr.clustering.enabled=true"

# Location where the bin/solr script will save PID files for running instances
# If not set, the script will create PID files in $SOLR_TIP/bin
#SOLR_PID_DIR=

# Path to a directory for Solr to store cores and their data. By default, Solr will use server/solr
# If solr.xml is not stored in ZooKeeper, this directory needs to contain solr.xml
#SOLR_HOME=

# Solr provides a default Log4J configuration properties file in server/resources
# however, you may want to customize the log settings and file appender location
# so you can point the script to use a different log4j.properties file
#LOG4J_PROPS=/var/solr/log4j.properties

# Location where Solr should write logs to; should agree with the file appender
# settings in server/resources/log4j.properties
#SOLR_LOGS_DIR=

# Sets the port Solr binds to, default is 8983
#SOLR_PORT=8983

# Uncomment to set SSL-related system properties
# Be sure to update the paths to the correct keystore for your environment
#SOLR_SSL_KEY_STORE=/home/shalin/work/oss/shalin-lusolr/solr/server/etc/solr-ssl.keystore.jks
#SOLR_SSL_KEY_STORE_PASSWORD=secret
#SOLR_SSL_TRUST_STORE=/home/shalin/work/oss/shalin-lusolr/solr/server/etc/solr-ssl.keystore.jks
#SOLR_SSL_TRUST_STORE_PASSWORD=secret
#SOLR_SSL_NEED_CLIENT_AUTH=false
#SOLR_SSL_WANT_CLIENT_AUTH=false

# Uncomment if you want to override previously defined SSL values for HTTP client
# otherwise keep them commented and the above values will automatically be set for HTTP clients
#SOLR_SSL_CLIENT_KEY_STORE=
#SOLR_SSL_CLIENT_KEY_STORE_PASSWORD=
#SOLR_SSL_CLIENT_TRUST_STORE=
#SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD=

# Settings for authentication
#SOLR_AUTHENTICATION_CLIENT_CONFIGURER=
#SOLR_AUTHENTICATION_OPTS=

# Settings for ZK ACL
#SOLR_ZK_CREDS_AND_ACLS="-DzkACLProvider=org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider \
# -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider \
# -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD \
# -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD"
#SOLR_OPTS="$SOLR_OPTS $SOLR_ZK_CREDS_AND_ACLS"

Loading

0 comments on commit bca7bff

Please sign in to comment.