Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ deps:
clean:
$(REBAR) clean
rm -rf riak_test/ebin
rm -rf build
git clean -dfx priv/solr

distclean: clean
$(REBAR) delete-deps
Expand Down
12 changes: 10 additions & 2 deletions priv/conf/solrconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
this file, see http://wiki.apache.org/solr/SolrConfigXml.
-->
<config>
<luceneMatchVersion>LUCENE_43</luceneMatchVersion>
<luceneMatchVersion>4.4</luceneMatchVersion>
<lib dir="${yz.lib.dir}" />

<!-- Data Directory
Expand Down Expand Up @@ -478,6 +478,13 @@
multipartUploadLimitInKB - specifies the max size of
Multipart File Uploads that Solr will allow in a Request.

addHttpRequestToContext - if set to true, it will instruct
the requestParsers to include the original HttpServletRequest
object in the context map of the SolrQueryRequest under the
key "httpRequest". It will not be used by any of the existing
Solr components, but may be useful when developing custom
plugins.

*** WARNING ***
The settings below authorize Solr to fetch remote files, You
should make sure your system has some authentication before
Expand All @@ -486,7 +493,8 @@
-->
<requestParsers enableRemoteStreaming="false"
multipartUploadLimitInKB="2048000"
formdataUploadLimitInKB="102400"/>
formdataUploadLimitInKB="102400"
addHttpRequestToContext="false"/>

<!-- HTTP Caching

Expand Down
74 changes: 35 additions & 39 deletions priv/default_schema.xml

Large diffs are not rendered by default.

24 changes: 6 additions & 18 deletions priv/template_solr.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
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
<solr>

http://www.apache.org/licenses/LICENSE-2.0
<shardHandlerFactory name="shardHandlerFactory"
class="HttpShardHandlerFactory">
<int name="socketTimeout">${socketTimeout:0}</int>
<int name="connTimeout">${connTimeout:0}</int>
</shardHandlerFactory>

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.
-->

<solr persistent="true">
<cores adminPath="/admin/cores">
</cores>
</solr>
24 changes: 12 additions & 12 deletions solr-patches/no-stale-check.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 47a169fe3eee2ff8edc2fbea15040993fd48c81b Mon Sep 17 00:00:00 2001
From 7f09bcb1e795e58a6f1fe525a20526e5a2430bc6 Mon Sep 17 00:00:00 2001
From: Ryan Zezeski <rzezeski@gmail.com>
Date: Tue, 12 Feb 2013 11:54:21 -0500
Subject: [PATCH] Disable stale check and nagle
Expand All @@ -12,31 +12,31 @@ Subject: [PATCH] Disable stale check and nagle

* Disable nagle as it's meant for protocols that use many small messages.
---
.../solr/handler/component/HttpShardHandlerFactory.java | 3 +++
.../org/apache/solr/client/solrj/impl/HttpClientUtil.java | 13 +++++++++++++
.../solr/handler/component/HttpShardHandlerFactory.java | 3 +++
.../org/apache/solr/client/solrj/impl/HttpClientUtil.java | 13 +++++++++++++
2 files changed, 16 insertions(+)

diff --git a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
index 27f9f79..2537705 100644
index d55e01f..cc59731 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
@@ -20,6 +20,7 @@ import java.net.MalformedURLException;
import java.util.Random;
import java.util.concurrent.*;
@@ -29,6 +29,7 @@ import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

+import org.apache.http.params.HttpConnectionParams;
import org.apache.http.client.HttpClient;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpClientUtil;
import org.apache.solr.client.solrj.impl.LBHttpSolrServer;
@@ -132,6 +133,8 @@ public class HttpShardHandlerFactory extends ShardHandlerFactory implements Plug
@@ -150,6 +151,8 @@ public class HttpShardHandlerFactory extends ShardHandlerFactory implements org.
clientParams.set(HttpClientUtil.PROP_CONNECTION_TIMEOUT, connectionTimeout);
clientParams.set(HttpClientUtil.PROP_USE_RETRY, false);
this.defaultClient = HttpClientUtil.createClient(clientParams);
+ this.defaultClient.getParams().setParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false);
+ this.defaultClient.getParams().setParameter(HttpConnectionParams.TCP_NODELAY, true);
this.loadbalancer = createLoadbalancer(defaultClient);
}

try {
loadbalancer = new LBHttpSolrServer(defaultClient);
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
index 3887302..4649138 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
Expand Down Expand Up @@ -69,5 +69,5 @@ index 3887302..4649138 100644
return httpClient;
}
--
1.7.10.4
1.8.1.2

7 changes: 4 additions & 3 deletions tools/build-solr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#>
#> ./build-solr.sh --patch-dir ~/yokozuna/solr-patches /tmp/build-solr solr-4.2.0-yz http://www.motorlogy.com/apache/lucene/solr/4.2.0/solr-4.2.0-src.tgz | tee build-solr.out

set -e

error()
{
echo "ERROR: $1"
Expand Down Expand Up @@ -68,14 +70,13 @@ WORK_DIR=$1; shift
NAME=$1; shift
URL=$1; shift

if [ ! -x "`which ant`"]; then
if [ ! -x "`which ant`" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐟

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dat set -e.

echo "Couldn't find ant, which is needed to compile Solr."
exit 1
fi

mkdir $WORK_DIR
if test ! -e $WORK_DIR; then
error "failed to created work dir: $WORK_DIR"
mkdir $WORK_DIR
fi

cd $WORK_DIR
Expand Down
10 changes: 7 additions & 3 deletions tools/grab-solr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fi

SOLR_DIR=../priv/solr
BUILD_DIR=../build
VSN=solr-4.3.0-yz
VSN=solr-4.4.0-yz
FILENAME=$VSN.tgz
TMP_DIR=/tmp/yokozuna
TMP_FILE=$TMP_DIR/$FILENAME
Expand All @@ -38,8 +38,12 @@ get_solr()
else
echo "Pulling Solr from S3"
wget --no-check-certificate --progress=dot:mega https://s3.amazonaws.com/yzami/pkgs/$FILENAME
mkdir $TMP_DIR
cp $FILENAME $TMP_DIR
if [ -d $TMP_DIR ]; then
cp $FILENAME $TMP_DIR
else
mkdir $TMP_DIR
cp $FILENAME $TMP_DIR
fi
fi
else
# This is now obsolete thanks to implicit caching above
Expand Down