Apache Lucene open-source search software
add a version of Solr under Flare too
Erik Hatcher8570fa21b3cb
diff --git a/client/ruby/flare/solr/etc/LICENSE.javax.servlet.txt b/client/ruby/flare/solr/etc/LICENSE.javax.servlet.txtnew file mode 100644index 00000000000..322799e311a--- /dev/null+++ b/client/ruby/flare/solr/etc/LICENSE.javax.servlet.txt@@ -0,0 +1,65 @@+/*+ * $Header: /cvsroot/jetty/Jetty/etc/LICENSE.javax.servlet.txt,v 1.2 2001/11/06 00:01:51 gregwilkins Exp $+ * $Revision: 1.2 $+ * $Date: 2001/11/06 00:01:51 $+ *+ * ====================================================================+ *+ * The Apache Software License, Version 1.1+ *+ * Copyright (c) 1999-2001 The Apache Software Foundation. All rights+ * reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions+ * are met:+ *+ * 1. Redistributions of source code must retain the above copyright+ * notice, this list of conditions and the following disclaimer.+ *+ * 2. Redistributions in binary form must reproduce the above copyright+ * notice, this list of conditions and the following disclaimer in+ * the documentation and/or other materials provided with the+ * distribution.+ *+ * 3. The end-user documentation included with the redistribution, if+ * any, must include the following acknowlegement:+ * "This product includes software developed by the+ * Apache Software Foundation (http://www.apache.org/)."+ * Alternately, this acknowlegement may appear in the software itself,+ * if and wherever such third-party acknowlegements normally appear.+ *+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software+ * Foundation" must not be used to endorse or promote products derived+ * from this software without prior written permission. For written+ * permission, please contact [email protected].+ *+ * 5. Products derived from this software may not be called "Apache"+ * nor may "Apache" appear in their names without prior written+ * permission of the Apache Group.+ *+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF+ * SUCH DAMAGE.+ * ====================================================================+ *+ * This software consists of voluntary contributions made by many+ * individuals on behalf of the Apache Software Foundation. For more+ * information on the Apache Software Foundation, please see+ * <http://www.apache.org/>.+ *+ */+++++diff --git a/client/ruby/flare/solr/etc/LICENSE.javax.xml.html b/client/ruby/flare/solr/etc/LICENSE.javax.xml.htmlnew file mode 100644index 00000000000..c833ff7b461--- /dev/null+++ b/client/ruby/flare/solr/etc/LICENSE.javax.xml.html@@ -0,0 +1,200 @@+<HTML>+<HEAD>+ <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">+ <TITLE></TITLE>+ <META NAME="GENERATOR" CONTENT="StarOffice/5.2 (Solaris Sparc)">+ <META NAME="AUTHOR" CONTENT="douglass hall">+ <META NAME="CREATED" CONTENT="20010109;9281200">+ <META NAME="CHANGEDBY" CONTENT=" ">+ <META NAME="CHANGED" CONTENT="20010112;13325200">+</HEAD>+<BODY>+<P ALIGN=CENTER><FONT SIZE=4>Sun Microsystems, Inc.</FONT> <BR><FONT SIZE=4>Binary+Code License Agreement</FONT></P>+<P>READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL+LICENSE TERMS (COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE+OPENING THE SOFTWARE MEDIA PACKAGE. BY OPENING THE SOFTWARE+MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU+ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE+OF THESE TERMS BY SELECTING THE "ACCEPT" BUTTON AT THE END+OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL THESE TERMS,+PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A+REFUND OR, IF THE SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE+"DECLINE" BUTTON AT THE END OF THIS AGREEMENT.+</P>+<P><B>1. LICENSE TO USE.</B> Sun grants you a+non-exclusive and non-transferable license for the internal use only+of the accompanying software and documentation and any error+corrections provided by Sun (collectively "Software"), by+the number of users and the class of computer hardware for which the+corresponding fee has been paid.+</P>+<P><B>2. RESTRICTIONS. </B> Software is confidential and+copyrighted. Title to Software and all associated intellectual+property rights is retained by Sun and/or its licensors. Except+as specifically authorized in any Supplemental License Terms, you may+not make copies of Software, other than a single copy of Software for+archival purposes. Unless enforcement is prohibited by+applicable law, you may not modify, decompile, or reverse engineer+Software. You acknowledge that Software is not designed,+licensed or intended for use in the design, construction, operation+or maintenance of any nuclear facility. Sun disclaims any+express or implied warranty of fitness for such uses. No right,+title or interest in or to any trademark, service mark, logo or trade+name of Sun or its licensors is granted under this Agreement.+</P>+<P><B>3. LIMITED WARRANTY.</B> Sun warrants to you that for a+period of ninety (90) days from the date of purchase, as evidenced by+a copy of the receipt, the media on which Software is furnished (if+any) will be free of defects in materials and workmanship under+normal use. Except for the foregoing, Software is provided "AS+IS". Your exclusive remedy and Sun's entire liability+under this limited warranty will be at Sun's option to replace+Software media or refund the fee paid for Software.+</P>+<P><B>4. DISCLAIMER OF WARRANTY. </B> UNLESS SPECIFIED IN+THIS AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS+AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED,+EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY+INVALID.+</P>+<P><B>5. LIMITATION OF LIABILITY.</B> TO THE EXTENT NOT+PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE+FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT,+CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED+REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO+THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED+OF THE POSSIBILITY OF SUCH DAMAGES. In no event will Sun's+liability to you, whether in contract, tort (including negligence),+or otherwise, exceed the amount paid by you for Software under this+Agreement. The foregoing limitations will apply even if the+above stated warranty fails of its essential purpose.+</P>+<P><B>6. Termination.</B> This Agreement is effective+until terminated. You may terminate this Agreement at any time+by destroying all copies of Software. This Agreement will+terminate immediately without notice from Sun if you fail to comply+with any provision of this Agreement. Upon Termination, you+must destroy all copies of Software.+</P>+<P><B>7. Export Regulations.</B> All Software and technical data+delivered under this Agreement are subject to US export control laws+and may be subject to export or import regulations in other+countries. You agree to comply strictly with all such laws and+regulations and acknowledge that you have the responsibility to+obtain such licenses to export, re-export, or import as may be+required after delivery to you.+</P>+<P><B>8. U.S. Government Restricted Rights. </B> If+Software is being acquired by or on behalf of the U.S. Government or+by a U.S. Government prime contractor or subcontractor (at any tier),+then the Government's rights in Software and accompanying+documentation will be only as set forth in this Agreement; this is in+accordance with 48 CFR 227.7201 through 227.7202-4 (for Department of+Defense (DOD) acquisitions) and with 48 CFR 2.101 and 12.212 (for+non-DOD acquisitions).+</P>+<P><B>9. Governing Law.</B> Any action related to this+Agreement will be governed by California law and controlling U.S.+federal law. No choice of law rules of any jurisdiction will+apply.+</P>+<P><B>10. Severability.</B> If any provision of this Agreement+is held to be unenforceable, this Agreement will remain in effect+with the provision omitted, unless omission would frustrate the+intent of the parties, in which case this Agreement will immediately+terminate.+</P>+<P><B>11. Integration.</B> This Agreement is the entire+agreement between you and Sun relating to its subject matter. +It supersedes all prior or contemporaneous oral or written+communications, proposals, representations and warranties and+prevails over any conflicting or additional terms of any quote,+order, acknowledgment, or other communication between the parties+relating to its subject matter during the term of this Agreement. +No modification of this Agreement will be binding, unless in writing+and signed by an authorized representative of each party.+</P>+<P ALIGN=CENTER>JAVA(TM) INTERFACE CLASSES <BR><BR>JAVA API FOR XML+PROCESSING (JAXP), VERSION 1.1 <BR>SUPPLEMENTAL LICENSE TERMS</P>+<P>These supplemental license terms ("Supplemental Terms")+add to or modify the terms of the Binary Code License Agreement+(collectively, the "Agreement"). Capitalized terms not+defined in these Supplemental Terms shall have the same meanings+ascribed to them in the Agreement. These Supplemental Terms shall+supersede any inconsistent or conflicting terms in the Agreement, or+in any license contained within the Software.+</P>+<P><B>1. Software Internal Use and Development License Grant.</B>+Subject to the terms and conditions of this Agreement, including, but+not limited to Section 3 (Java(TM) Technology Restrictions) of these+Supplemental Terms, Sun grants you a non-exclusive, non-transferable,+limited license to reproduce internally and use internally the binary+ form of the Software, complete and unmodified, for the sole purpose+of designing, developing and testing your Java applets and+applications ("Programs").+</P>+<P><B>2. License to Distribute Software.</B> In addition to the+license granted in Section 1 (Software Internal Use and Development+License Grant) of these Supplemental Terms, subject to the terms and+conditions of this Agreement, including but not limited to Section 3+(Java Technology Restrictions), Sun grants you a non-exclusive,+non-transferable, limited license to reproduce and distribute the+Software in binary form, provided that you (i) distribute the+Software complete and unmodified and only bundled as part of your+Programs, (ii) do not distribute additional software intended to+replace any component(s) of the Software, (iii) do not remove or+alter any proprietary legends or notices contained in the Software,+(iv) only distribute the Software subject to a license agreement that+protects Sun's interests consistent with the terms contained in this+Agreement, and (v) agree to defend and indemnify Sun and its+licensors from and against any damages, costs, liabilities,+settlement amounts and/or expenses (including attorneys' fees)+incurred in connection with any claim, lawsuit or action by any third+party that arises or results from the use or distribution of any and+all Programs and/or Software.+</P>+<P><B>3. Java Technology Restrictions.</B> You may not modify the+Java Platform Interface ("JPI", identified as classes+contained within the "java" package or any subpackages of+the "java" package), by creating additional classes within+the JPI or otherwise causing the addition to or modification of the+classes in the JPI. In the event that you create an additional+class and associated API(s) which (i) extends the functionality of+the Java platform, and (ii) is exposed to third party software+developers for the purpose of developing additional software which+invokes such additional API, you must promptly publish broadly an+accurate specification for such API for free use by all developers.+You may not create, or authorize your licensees to create additional+classes, interfaces, or subpackages that are in any way identified as+"java", "javax", "sun" or similar+convention as specified by Sun in any naming convention designation.</P>+<P><B>4. Trademarks and Logos.</B> You acknowledge and agree as+between you and Sun that Sun owns the SUN, SOLARIS, JAVA, JINI,+FORTE, STAROFFICE, STARPORTAL and iPLANET trademarks and all SUN,+SOLARIS, JAVA, JINI, FORTE, STAROFFICE, STARPORTAL and+iPLANET-related trademarks, service marks, logos and other brand+designations ("Sun Marks"), and you agree to comply with+the Sun Trademark and Logo Usage Requirements currently located at+http://www.sun.com/policies/trademarks. Any use you make of the Sun+Marks inures to Sun's benefit.+</P>+<P><B>5. Source Code. </B>Software may contain source code that is+provided for reference purposes pursuant to the terms of this+Agreement. Source code may not be redistributed unless expressly+provided for in this Agreement. <SPAN STYLE="font-weight: medium">Portions+of this download are governed by the Apache Source Code License and+are identified in the Readme file. A copy of the Apache License is+supplied with the Apache Source Code.</SPAN></P>+<P><B>6. Termination for Infringement. </B> Either party may+terminate this Agreement immediately should any Software become, or+in either party's opinion be likely to become, the subject of a claim+of infringement of any intellectual property right.+</P>+<P>For inquiries please contact: Sun Microsystems, Inc. 901 San+Antonio Road, Palo Alto, California 94303 <BR><I><FONT SIZE=2>(Form+last modified 11-03-2000.)</FONT></I>+</P>+</BODY>+</HTML>diff --git a/client/ruby/flare/solr/etc/LICENSE.jsse.txt b/client/ruby/flare/solr/etc/LICENSE.jsse.txtnew file mode 100644index 00000000000..1c305dce30e--- /dev/null+++ b/client/ruby/flare/solr/etc/LICENSE.jsse.txt@@ -0,0 +1,200 @@+Sun Microsystems, Inc.+Binary Code License Agreement++READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED+SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY "AGREEMENT")+CAREFULLY BEFORE OPENING THE SOFTWARE MEDIA PACKAGE. BY+OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS+OF THIS AGREEMENT. IF YOU ARE ACCESSING THE SOFTWARE+ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY+SELECTING THE "ACCEPT" BUTTON AT THE END OF THIS AGREEMENT.+ IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY RETURN+THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND+OR, IF THE SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE+"DECLINE" BUTTON AT THE END OF THIS AGREEMENT.++1. LICENSE TO USE. Sun grants you a non-exclusive and+non-transferable license for the internal use only of the+accompanying software and documentation and any error+corrections provided by Sun (collectively "Software"), by+the number of users and the class of computer hardware for+which the corresponding fee has been paid.++2. RESTRICTIONS. Software is confidential and+copyrighted. Title to Software and all associated+intellectual property rights is retained by Sun and/or its+licensors. Except as specifically authorized in any+Supplemental License Terms, you may not make copies of+Software, other than a single copy of Software for archival+purposes. Unless enforcement is prohibited by applicable+law, you may not modify, decompile, or reverse engineer+Software. You acknowledge that Software is not designed,+licensed or intended for use in the design, construction,+operation or maintenance of any nuclear facility. Sun+disclaims any express or implied warranty of fitness for+such uses. No right, title or interest in or to any+trademark, service mark, logo or trade name of Sun or its+licensors is granted under this Agreement.++3. LIMITED WARRANTY. Sun warrants to you that for a period+of ninety (90) days from the date of purchase, as evidenced+by a copy of the receipt, the media on which Software is+furnished (if any) will be free of defects in materials and+workmanship under normal use. Except for the foregoing,+Software is provided "AS IS". Your exclusive remedy and+Sun's entire liability under this limited warranty will be+at Sun's option to replace Software media or refund the fee+paid for Software.++4. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS+AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS,+REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED+WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR+PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE+EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY+INVALID.++5. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED+BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR+ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT,+CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER+CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT+OF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE,+EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH+DAMAGES. In no event will Sun's liability to you, whether+in contract, tort (including negligence), or otherwise,+exceed the amount paid by you for Software under this+Agreement. The foregoing limitations will apply even if+the above stated warranty fails of its essential purpose.++6. Termination. This Agreement is effective until+terminated. You may terminate this Agreement at any time+by destroying all copies of Software. This Agreement will+terminate immediately without notice from Sun if you fail+to comply with any provision of this Agreement. Upon+Termination, you must destroy all copies of Software.++7. Export Regulations. All Software and technical data+delivered under this Agreement are subject to US export+control laws and may be subject to export or import+regulations in other countries. You agree to comply+strictly with all such laws and regulations and acknowledge+that you have the responsibility to obtain such licenses to+export, re-export, or import as may be required after+delivery to you.++8. U.S. Government Restricted Rights. If Software is+being acquired by or on behalf of the U.S. Government or by+a U.S. Government prime contractor or subcontractor (at any+tier), then the Government's rights in Software and+accompanying documentation will be only as set forth in+this Agreement; this is in accordance with 48 CFR 227.7201+through 227.7202-4 (for Department of Defense (DOD)+acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD+acquisitions).++9. Governing Law. Any action related to this Agreement+will be governed by California law and controlling U.S.+federal law. No choice of law rules of any jurisdiction+will apply.++10. Severability. If any provision of this Agreement is+held to be unenforceable, this Agreement will remain in+effect with the provision omitted, unless omission would+frustrate the intent of the parties, in which case this+Agreement will immediately terminate.++11. Integration. This Agreement is the entire agreement+between you and Sun relating to its subject matter. It+supersedes all prior or contemporaneous oral or written+communications, proposals, representations and warranties+and prevails over any conflicting or additional terms of+any quote, order, acknowledgment, or other communication+between the parties relating to its subject matter during+the term of this Agreement. No modification of this+Agreement will be binding, unless in writing and signed by+an authorized representative of each party.++For inquiries please contact: Sun Microsystems, Inc. 901+San Antonio Road, Palo Alto, California 94303++JAVATM DEVELOPMENT OPTIONAL PACKAGES+JAVATM SECURE SOCKET EXTENSION, VERSION 1.0.2++SUPPLEMENTAL LICENSE TERMS++These supplemental license terms ("Supplement") add to or+modify the terms of the Binary Code License Agreement+(collectively, the "Agreement"). Capitalized terms not+defined in this Supplement shall have the same meanings+ascribed to them in the Agreement. These Supplement terms+shall supersede any inconsistent or conflicting terms in+the Agreement, or in any license contained within the+Software.++1. License to Distribute. Sun grants you a non-exclusive,+non-transferable, royalty-free, limited license to (a) use+the binary form of the Software for the sole purpose of+designing, developing and testing your JavaTM applets and+applications intended to run on a compatible Java+environment (the "Programs"), provided that the Programs+add significant and primary functionality to the Software,+and (b) reproduce and distribute the binary form of the+Software through multiple tiers of distribution provided+that you: (i) distribute the Software complete and+unmodified; (ii) do not distribute additional software+intended to supersede any component(s) of the Software;+(iii) do not remove or alter any proprietary+legends or notices contained in or on the Software; and+(iv) only distribute the Software pursuant to a license+agreement that protects Sun's interests consistent with the+terms contained in this Agreement, and provides that Sun is+a third party beneficiary to such license agreement. If you+distribute the Software pursuant to this paragraph, you+must include the following statement as part of product+documentation (whether hard copy or electronic), as a+part of a copyright page or proprietary rights notice+page, in an "About" box or in any other form reasonably+designed to make the statement visible to users of the+Software: "This product includes code licensed from+RSA Data Security".++2. Requirements. In exchange for the licenses granted in+Paragraph 1 above, you agree:++a. not to create, or authorize your licensees to create,+additional classes, interfaces or subpackages that are+contained in the "java," "javax" or "sun" packages, or+similarly named package, as specified by Sun in any naming+convention;++b. that, in the event that you create an API(s) which: (i)+extends the functionality of a Java platform; and (ii) is+distributed to third party software developers for the+purpose of developing software which invokes such+additional API, you must promptly and broadly publish an+accurate specification for such API for free use by all+developers; and++c. to defend and indemnify Sun and its licensors from and+against any damages, costs, liabilities, settlement amounts+and/or expenses (including attorneys' fees) incurred in+connection with any claim, lawsuit or action by any third+party that arises or results from the use or distribution+of any and all Programs and/or Software.++3. Trademarks and Logos. You acknowledge and agree as+between you and Sun that Sun owns the Java trademark and+all Java-related trademarks, service marks, logos and other+brand designations including the Coffee Cup logo and Duke+logo ("Java Marks"), and you agree to comply with the Sun+Trademark and Logo Usage Requirements currently located at+http://www.sun.com/policies/trademarks. Any use you make of+the Java Marks inures to Sun's benefit.++4. Source Code. Software may contain source code that is+provided solely for reference purposes pursuant to the+terms of this Agreement.+++diff --git a/client/ruby/flare/solr/etc/admin.xml b/client/ruby/flare/solr/etc/admin.xmlnew file mode 100644index 00000000000..18b364eb56f--- /dev/null+++ b/client/ruby/flare/solr/etc/admin.xml@@ -0,0 +1,82 @@+<?xml version="1.0" encoding="ISO-8859-1"?>+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">++<!--+This is a Jetty HTTP admin server configuration file. This configuration+uses the generic org.mortbay.util.XmlConfiguration class to call+the normal org.mortbay.http.HttpServer configuration API from+within an XML script.++The format of this file is described in the configure.dtd file.++The API that can be called by this file is described in the+Javadoc for Jetty.++$Id: admin.xml,v 1.28 2005/01/16 00:22:20 gregwilkins Exp $+-->++<Configure class="org.mortbay.jetty.Server">+ <Call name="addListener">+ <Arg>+ <New class="org.mortbay.http.SocketListener">+ <Set name="Host">localhost</Set>+ <Set name="Port">8081</Set>+ <Set name="MinThreads">1</Set>+ <Set name="MaxThreads">5</Set>+ <Set name="MaxIdleTimeMs">30000</Set>+ </New>+ </Arg>+ </Call>++ <Call name="addRealm">+ <Arg>+ <New class="org.mortbay.http.HashUserRealm">+ <Arg>Admin Realm</Arg>+ <Put name="admin">admin</Put>+ <Call name="addUserToRole"><Arg>admin</Arg><Arg>server-administrator</Arg></Call>+ </New>+ </Arg>+ </Call>++ <Call name="addContext">+ <Arg>/</Arg>+ <Set name="realmName">Admin Realm</Set>+ <Set name="authenticator"><New class="org.mortbay.http.BasicAuthenticator"/></Set>++ <Call name="addHandler">+ <Arg><New class="org.mortbay.http.handler.SecurityHandler"/></Arg>+ </Call>+ <Call name="addSecurityConstraint">+ <Arg>/</Arg>+ <Arg><New class="org.mortbay.http.SecurityConstraint">+ <Arg>Admin</Arg>+ <Arg>server-administrator</Arg>+ </New></Arg>+ </Call>++ <Call name="addServlet">+ <Arg>Admin</Arg>+ <Arg>/</Arg>+ <Arg>org.mortbay.servlet.AdminServlet</Arg>+ </Call>++ <Call name="addServlet">+ <Arg>Debug</Arg>+ <Arg>/debug/*</Arg>+ <Arg>org.mortbay.servlet.Debug</Arg>+ </Call>++ <Call name="setAttribute">+ <Arg>org.mortbay.http.HttpServer</Arg>+ <Arg><Call name="getHttpServer"/></Arg>+ </Call>+ </Call>++ <Set name="anonymous">true</Set>+ <Set name="requestsPerGC">1</Set>++</Configure>++++diff --git a/client/ruby/flare/solr/etc/jetty-jmx.xml b/client/ruby/flare/solr/etc/jetty-jmx.xmlnew file mode 100644index 00000000000..3ab5e2fdbf4--- /dev/null+++ b/client/ruby/flare/solr/etc/jetty-jmx.xml@@ -0,0 +1,37 @@+<?xml version="1.0"?>+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">+++<!-- =============================================================== -->+<!-- Configure the Jetty Server -->+<!-- =============================================================== -->+<Configure>++ <Call id="jmxserver" class="javax.management.MBeanServerFactory" name="createMBeanServer">++ <Arg>org.mortbay</Arg>++ <Call name="createMBean">+ <Arg>org.mortbay.util.jmx.MX4JHttpAdaptor</Arg>+ <Arg><New class="javax.management.ObjectName"><Arg>mx4j.tools:adaptor=http</Arg></New></Arg>+ <Arg><Array type="java.lang.Object"><Item type="int">8082</Item><Item>localhost</Item></Array></Arg>+ <Arg><Array type="java.lang.String"><Item>int</Item><Item>java.lang.String</Item></Array></Arg>+ </Call>++ <Call name="createMBean">+ <Arg>org.mortbay.jetty.jmx.ServerMBean</Arg>+ <Arg><New class="javax.management.ObjectName"><Arg>org.mortbay:jetty=admin</Arg></New></Arg>+ <Arg><Array type="java.lang.Object"><Item>etc/admin.xml</Item></Array></Arg>+ <Arg><Array type="java.lang.String"><Item>java.lang.String</Item></Array></Arg>+ </Call>++ <Call name="createMBean">+ <Arg>org.mortbay.jetty.jmx.ServerMBean</Arg>+ <Arg><New class="javax.management.ObjectName"><Arg>org.mortbay:jetty=default</Arg></New></Arg>+ <Arg><Array type="java.lang.Object"><Item>etc/jetty.xml</Item></Array></Arg>+ <Arg><Array type="java.lang.String"><Item>java.lang.String</Item></Array></Arg>+ </Call>++ </Call>++</Configure>diff --git a/client/ruby/flare/solr/etc/jetty.xml b/client/ruby/flare/solr/etc/jetty.xmlnew file mode 100755index 00000000000..e2070b7c2ba--- /dev/null+++ b/client/ruby/flare/solr/etc/jetty.xml@@ -0,0 +1,252 @@+<?xml version="1.0"?>+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">++++<!-- =============================================================== -->+<!-- Configure the Jetty Server -->+<!-- =============================================================== -->+<Configure class="org.mortbay.jetty.Server">++ <!-- =============================================================== -->+ <!-- Configure Logging -->+ <!-- =============================================================== -->+++ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- Configure Jetty Logging. -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- Uncomment if using jetty logging.+ <Call class="org.mortbay.log.LogFactory" name="getFactory">+ <Call name="getInstance">+ <Arg/>+ <Call name="reset"/>+ <Call name="add">+ <Arg>+ <New class="org.mortbay.log.OutputStreamLogSink">+ <Set name="filename"><SystemProperty name="jetty.home" default="."/>/logs/yyyy_mm_dd.jetty.log</Set>+ <Set name="retainDays">90</Set>+ <Set name="append">true</Set>+ <Set name="logLabels">true</Set>+ <Set name="logStackSize">true</Set>+ <Set name="logStackTrace">false</Set>+ <Set name="logOneLine">false</Set>+ <Set name="suppressStack">false</Set>+ <Set name="logTimeZone">GMT</Set>+ </New>+ </Arg>+ </Call>+ </Call>+ </Call>+ -->++ <!-- =============================================================== -->+ <!-- Configure the Request Listeners -->+ <!-- =============================================================== -->++ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- Add and configure a HTTP listener to port 8983 -->+ <!-- The default port can be changed using: java -Djetty.port=80 -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <Call name="addListener">+ <Arg>+ <New class="org.mortbay.http.SocketListener">+ <Set name="Port"><SystemProperty name="jetty.port" default="8983"/></Set>+ <Set name="PoolName">P1</Set>+ <Set name="MinThreads">20</Set>+ <Set name="MaxThreads">200</Set>+ <Set name="lowResources">50</Set>+ <Set name="MaxIdleTimeMs">30000</Set>+ <Set name="LowResourcePersistTimeMs">2000</Set>+ <Set name="acceptQueueSize">0</Set>+ <Set name="ConfidentialPort">8443</Set>+ <Set name="IntegralPort">8443</Set>+ </New>+ </Arg>+ </Call>+++ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- Add a HTTPS SSL listener on port 8443 -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- UNCOMMENT TO ACTIVATE+ <Call name="addListener">+ <Arg>+ <New class="org.mortbay.http.SslListener">+ <Set name="Port">8443</Set>+ <Set name="PoolName">P1</Set>+ <Set name="MaxIdleTimeMs">30000</Set>+ <Set name="lowResources">30</Set>+ <Set name="LowResourcePersistTimeMs">2000</Set>+ <Set name="Keystore"><SystemProperty name="jetty.home" default="."/>/etc/demokeystore</Set>+ <Set name="Password">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>+ <Set name="KeyPassword">OBF:1u2u1wml1z7s1z7a1wnl1u2g</Set>++ <Set name="HttpHandler">+ <New class="org.mortbay.http.handler.MsieSslHandler">+ <Set name="UserAgentSubString">MSIE 5</Set>+ </New>+ </Set>+ </New>+ </Arg>+ </Call>+ -->+++ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- Add a AJP13 listener on port 8009 -->+ <!-- This protocol can be used with mod_jk in apache, IIS etc. -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!--+ <Call name="addListener">+ <Arg>+ <New class="org.mortbay.http.ajp.AJP13Listener">+ <Set name="Port">8009</Set>+ <Set name="MinThreads">5</Set>+ <Set name="MaxThreads">20</Set>+ <Set name="MaxIdleTimeMs">0</Set>+ <Set name="confidentialPort">443</Set>+ </New>+ </Arg>+ </Call>+ -->+++ <!-- =============================================================== -->+ <!-- Set the default web application configuration mechanisms: -->+ <!-- XMLConfiguration - handles WEB-INF/web.xml -->+ <!-- JettyWebConfiguration - handles WEB-INF/jetty-web.xml -->+ <!-- jsr77.Configuration - Adds jsr77 statistics to servlets -->+ <!-- -->+ <!-- Order of these classes is significant. The defaults set here -->+ <!-- can be overridden by calling setConfigurationClassNames() on -->+ <!-- the webapp context. -->+ <!-- The TagLibconfiguration scans any tld files found for -->+ <!-- additional j2ee listener classes - needed for JSF -->+ <!-- The jsr77 configuration requires additional jars on the -->+ <!-- on the classpath and it needs jmx enabled. -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <Set name="WebApplicationConfigurationClassNames">+ <Array type="java.lang.String">+ <Item>org.mortbay.jetty.servlet.XMLConfiguration</Item>+ <Item>org.mortbay.jetty.servlet.JettyWebConfiguration</Item>++ <!--+ <Item>org.mortbay.jetty.servlet.TagLibConfiguration</Item>+ <Item>org.mortbay.jetty.servlet.jsr77.Configuration</Item>+ -->+ </Array>+ </Set>+++ <!-- =============================================================== -->+ <!-- Configure the Contexts -->+ <!-- =============================================================== -->+++ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- Add a all web application within the webapps directory. -->+ <!-- + No virtual host specified -->+ <!-- + Look in the webapps directory relative to jetty.home or . -->+ <!-- + Use the webdefault.xml resource for the defaults descriptor -->+ <!-- + Upack the war file -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <Set name="rootWebApp">root</Set>++ <Call name="addWebApplications">+ <Arg></Arg>+ <Arg><SystemProperty name="jetty.home" default="."/>/webapps/</Arg>+ <Arg><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Arg>+ <Arg type="boolean">true</Arg><!--extract WARs-->+ <Arg type="boolean">false</Arg><!-- java 2 compliant class loader -->+ </Call>+++ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- Add and configure a specific web application -->+ <!-- + Set Unpack WAR files -->+ <!-- + Set Default Descriptor. Resource, file or URL -->+ <!-- + Set java 2 complaint classloading -->+ <!-- + Set Virtual Hosts. A Null host or empty array means all hosts -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- UNCOMMENT TO ACTIVATE+ <Call name="addWebApplication">+ <Arg>/context</Arg>+ <Arg>./webapps/root</Arg>++ <Set name="extractWAR">false</Set>+ <Set name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set>+ <Set name="classLoaderJava2Compliant">true</Set>++ <Set name="virtualHosts">+ <Array type="java.lang.String">+ <Item></Item>+ <Item>127.0.0.1</Item>+ <Item>localhost</Item>+ <Item>www.acme.com</Item>+ </Array>+ </Set>+ </Call>+ -->++ <!-- =============================================================== -->+ <!-- Configure the Request Log -->+ <!-- =============================================================== -->+ <!-- Uncomment for request logging.+ <Set name="RequestLog">+ <New class="org.mortbay.http.NCSARequestLog">+ <Arg><SystemProperty name="jetty.home" default="."/>/logs/yyyy_mm_dd.request.log</Arg>+ <Set name="retainDays">90</Set>+ <Set name="append">true</Set>+ <Set name="extended">false</Set>+ <Set name="LogTimeZone">GMT</Set>+ </New>+ </Set>+ -->++ <!-- =============================================================== -->+ <!-- Configure the Other Server Options -->+ <!-- =============================================================== -->+ <Set name="requestsPerGC">2000</Set>+ <Set name="statsOn">false</Set>+ <Set class="org.mortbay.util.FileResource" name="checkAliases" type="boolean">true</Set>++ <!-- System classes cannot be overriden by a HttpContext or webapp+ <Set name="systemClasses">+ <Array type="java.lang.String">+ <Item>java.</Item>+ <Item>javax.servlet.</Item>+ <Item>javax.xml.</Item>+ <Item>org.mortbay.</Item>+ <Item>org.xml.</Item>+ <Item>org.w3c.</Item>+ <Item>org.apache.commons.logging.</Item>+ </Array>+ </Set>+ -->++ <!-- Server classes are hidden from a HttpContext or webapp+ <Set name="serverClasses">+ <Array type="java.lang.String">+ <Item>-org.mortbay.http.PathMap</Item>+ <Item>org.mortbay.http.</Item>+ <Item>-org.mortbay.jetty.servlet.Default</Item>+ <Item>-org.mortbay.jetty.servlet.Invoker</Item>+ <Item>-org.mortbay.jetty.servlet.JSR154Filter</Item>+ <Item>org.mortbay.jetty.</Item>+ <Item>org.mortbay.start.</Item>+ <Item>org.mortbay.stop.</Item>+ </Array>+ </Set>+ -->++</Configure>+++++++++diff --git a/client/ruby/flare/solr/etc/webdefault.xml b/client/ruby/flare/solr/etc/webdefault.xmlnew file mode 100644index 00000000000..b7ba1ca9f2e--- /dev/null+++ b/client/ruby/flare/solr/etc/webdefault.xml@@ -0,0 +1,373 @@+<?xml version="1.0" encoding="ISO-8859-1"?>++<!-- ===================================================================== -->+<!-- This file contains the default descriptor for web applications. -->+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+<!-- The intent of this descriptor is to include jetty specific or common -->+<!-- configuration for all webapps. If a context has a webdefault.xml -->+<!-- descriptor, it is applied before the contexts own web.xml file -->+<!-- -->+<!-- A context may be assigned a default descriptor by: -->+<!-- + Allowing the default defaultweb.xml to be applied -->+<!-- + Calling WebApplicationContext.setDefaultsDescriptor -->+<!-- + Passed an arg to addWebApplications -->+<!-- -->+<!-- If a defaults descriptor is set, it is first looked for as a system -->+<!-- resource. The jetty jar contains a webdefault.xml file as a resource -->+<!-- at "org/mortbay/jetty/servlet/webdefault.xml". If a system resource -->+<!-- is not found, then a normal resource is tried, thus a filename or URL -->+<!-- may be used to specify an arbitrary file. -->+<!-- -->+<!-- ===================================================================== -->+<web-app+ xmlns="http://java.sun.com/xml/ns/j2ee"+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"+ version="2.4">++ <description>+ Default web.xml file.+ This file is applied to a Web application before it's own WEB_INF/web.xml file+ </description>++++ <!-- ==================================================================== -->+ <!-- Context params to control Session Cookies -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- UNCOMMENT TO ACTIVATE+ <context-param>+ <param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>+ <param-value>127.0.0.1</param-value>+ </context-param>++ <context-param>+ <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>+ <param-value>/</param-value>+ </context-param>++ <context-param>+ <param-name>org.mortbay.jetty.servlet.MaxAge</param-name>+ <param-value>-1</param-value>+ </context-param>+ -->++++ <!-- ==================================================================== -->+ <!-- The default servlet. -->+ <!-- This servlet, normally mapped to /, provides the handling for static -->+ <!-- content, OPTIONS and TRACE methods for the context. -->+ <!-- The following initParameters are supported: -->+ <!-- -->+ <!-- acceptRanges If true, range requests and responses are -->+ <!-- supported -->+ <!-- -->+ <!-- dirAllowed If true, directory listings are returned if no -->+ <!-- welcome file is found. Else 403 Forbidden. -->+ <!-- -->+ <!-- putAllowed If true, the PUT method is allowed -->+ <!-- -->+ <!-- delAllowed If true, the DELETE method is allowed -->+ <!-- -->+ <!-- redirectWelcome If true, redirect welcome file requests -->+ <!-- else use request dispatcher forwards -->+ <!-- -->+ <!-- minGzipLength If set to a positive integer, then static content -->+ <!-- larger than this will be served as gzip content -->+ <!-- encoded if a matching resource is found ending -->+ <!-- with ".gz" -->+ <!-- -->+ <!-- resoureBase Can be set to replace the context resource base -->+ <!-- -->+ <!-- relativeResourceBase -->+ <!-- Set with a pathname relative to the base of the -->+ <!-- servlet context root. Useful for only serving -->+ <!-- static content from only specific subdirectories. -->+ <!-- -->+ <!-- The MOVE method is allowed if PUT and DELETE are allowed -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <servlet>+ <servlet-name>default</servlet-name>+ <servlet-class>org.mortbay.jetty.servlet.Default</servlet-class>+ <init-param>+ <param-name>acceptRanges</param-name>+ <param-value>true</param-value>+ </init-param>+ <init-param>+ <param-name>dirAllowed</param-name>+ <param-value>true</param-value>+ </init-param>+ <init-param>+ <param-name>putAllowed</param-name>+ <param-value>false</param-value>+ </init-param>+ <init-param>+ <param-name>delAllowed</param-name>+ <param-value>false</param-value>+ </init-param>+ <init-param>+ <param-name>redirectWelcome</param-name>+ <param-value>false</param-value>+ </init-param>+ <init-param>+ <param-name>minGzipLength</param-name>+ <param-value>8192</param-value>+ </init-param>+ <load-on-startup>0</load-on-startup>+ </servlet>++ <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>+++ <!-- ==================================================================== -->+ <!-- JSP Servlet -->+ <!-- This is the jasper JSP servlet from the jakarta project -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- The JSP page compiler and execution servlet, which is the mechanism -->+ <!-- used by Tomcat to support JSP pages. Traditionally, this servlet -->+ <!-- is mapped to URL patterh "*.jsp". This servlet supports the -->+ <!-- following initialization parameters (default values are in square -->+ <!-- brackets): -->+ <!-- -->+ <!-- checkInterval If development is false and reloading is true, -->+ <!-- background compiles are enabled. checkInterval -->+ <!-- is the time in seconds between checks to see -->+ <!-- if a JSP page needs to be recompiled. [300] -->+ <!-- -->+ <!-- compiler Which compiler Ant should use to compile JSP -->+ <!-- pages. See the Ant documenation for more -->+ <!-- information. [javac] -->+ <!-- -->+ <!-- classdebuginfo Should the class file be compiled with -->+ <!-- debugging information? [true] -->+ <!-- -->+ <!-- classpath What class path should I use while compiling -->+ <!-- generated servlets? [Created dynamically -->+ <!-- based on the current web application] -->+ <!-- -->+ <!-- development Is Jasper used in development mode (will check -->+ <!-- for JSP modification on every access)? [true] -->+ <!-- -->+ <!-- enablePooling Determines whether tag handler pooling is -->+ <!-- enabled [true] -->+ <!-- -->+ <!-- fork Tell Ant to fork compiles of JSP pages so that -->+ <!-- a separate JVM is used for JSP page compiles -->+ <!-- from the one Tomcat is running in. [true] -->+ <!-- -->+ <!-- ieClassId The class-id value to be sent to Internet -->+ <!-- Explorer when using <jsp:plugin> tags. -->+ <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->+ <!-- -->+ <!-- javaEncoding Java file encoding to use for generating java -->+ <!-- source files. [UTF8] -->+ <!-- -->+ <!-- keepgenerated Should we keep the generated Java source code -->+ <!-- for each page instead of deleting it? [true] -->+ <!-- -->+ <!-- logVerbosityLevel The level of detailed messages to be produced -->+ <!-- by this servlet. Increasing levels cause the -->+ <!-- generation of more messages. Valid values are -->+ <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->+ <!-- [WARNING] -->+ <!-- -->+ <!-- mappedfile Should we generate static content with one -->+ <!-- print statement per input line, to ease -->+ <!-- debugging? [false] -->+ <!-- -->+ <!-- -->+ <!-- reloading Should Jasper check for modified JSPs? [true] -->+ <!-- -->+ <!-- suppressSmap Should the generation of SMAP info for JSR45 -->+ <!-- debugging be suppressed? [false] -->+ <!-- -->+ <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->+ <!-- dumped to a file? [false] -->+ <!-- False if suppressSmap is true -->+ <!-- -->+ <!-- scratchdir What scratch directory should we use when -->+ <!-- compiling JSP pages? [default work directory -->+ <!-- for the current web application] -->+ <!-- -->+ <!-- tagpoolMaxSize The maximum tag handler pool size [5] -->+ <!-- -->+ <!-- xpoweredBy Determines whether X-Powered-By response -->+ <!-- header is added by generated servlet [false] -->+ <!-- -->+ <!-- If you wish to use Jikes to compile JSP pages: -->+ <!-- Set the init parameter "compiler" to "jikes". Define -->+ <!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->+ <!-- to cause Jikes to emit error messages in a format compatible with -->+ <!-- Jasper. -->+ <!-- If you get an error reporting that jikes can't use UTF8 encoding, -->+ <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <servlet>+ <servlet-name>jsp</servlet-name>+ <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>+ <init-param>+ <param-name>logVerbosityLevel</param-name>+ <param-value>DEBUG</param-value>+ </init-param>+ <init-param>+ <param-name>fork</param-name>+ <param-value>false</param-value>+ </init-param>+ <init-param>+ <param-name>xpoweredBy</param-name>+ <param-value>false</param-value>+ </init-param>+ <load-on-startup>0</load-on-startup>+ </servlet>++ <servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jsp</url-pattern> </servlet-mapping>+ <servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jspf</url-pattern> </servlet-mapping>+ <servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jspx</url-pattern> </servlet-mapping>+ <servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.xsp</url-pattern> </servlet-mapping>+++ <!-- ==================================================================== -->+ <!-- Dynamic Servlet Invoker. -->+ <!-- This servlet invokes anonymous servlets that have not been defined -->+ <!-- in the web.xml or by other means. The first element of the pathInfo -->+ <!-- of a request passed to the envoker is treated as a servlet name for -->+ <!-- an existing servlet, or as a class name of a new servlet. -->+ <!-- This servlet is normally mapped to /servlet/* -->+ <!-- This servlet support the following initParams: -->+ <!-- -->+ <!-- nonContextServlets If false, the invoker can only load -->+ <!-- servlets from the contexts classloader. -->+ <!-- This is false by default and setting this -->+ <!-- to true may have security implications. -->+ <!-- -->+ <!-- verbose If true, log dynamic loads -->+ <!-- -->+ <!-- * All other parameters are copied to the -->+ <!-- each dynamic servlet as init parameters -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- Uncomment for dynamic invocation+ <servlet>+ <servlet-name>invoker</servlet-name>+ <servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>+ <init-param>+ <param-name>verbose</param-name>+ <param-value>false</param-value>+ </init-param>+ <init-param>+ <param-name>nonContextServlets</param-name>+ <param-value>false</param-value>+ </init-param>+ <init-param>+ <param-name>dynamicParam</param-name>+ <param-value>anyValue</param-value>+ </init-param>+ <load-on-startup>0</load-on-startup>+ </servlet>++ <servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping>+ -->++++ <!-- ==================================================================== -->+ <session-config>+ <session-timeout>30</session-timeout>+ </session-config>++ <!-- ==================================================================== -->+ <!-- Default MIME mappings -->+ <!-- The default MIME mappings are provided by the mime.properties -->+ <!-- resource in the org.mortbay.jetty.jar file. Additional or modified -->+ <!-- mappings may be specified here -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- UNCOMMENT TO ACTIVATE+ <mime-mapping>+ <extension>mysuffix</extension>+ <mime-type>mymime/type</mime-type>+ </mime-mapping>+ -->++ <!-- ==================================================================== -->+ <welcome-file-list>+ <welcome-file>index.html</welcome-file>+ <welcome-file>index.htm</welcome-file>+ <welcome-file>index.jsp</welcome-file>+ </welcome-file-list>++ <!-- ==================================================================== -->+ <locale-encoding-mapping-list>+ <locale-encoding-mapping><locale>ar</locale><encoding>ISO-8859-6</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>be</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>bg</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>ca</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>cs</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>da</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>de</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>el</locale><encoding>ISO-8859-7</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>en</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>es</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>et</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>fi</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>fr</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>hr</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>hu</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>is</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>it</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>iw</locale><encoding>ISO-8859-8</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>ja</locale><encoding>Shift_JIS</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>ko</locale><encoding>EUC-KR</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>lt</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>lv</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>mk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>nl</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>no</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>pl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>pt</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>ro</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>ru</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>sh</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>sk</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>sl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>sq</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>sr</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>sv</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>tr</locale><encoding>ISO-8859-9</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>uk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>zh</locale><encoding>GB2312</encoding></locale-encoding-mapping>+ <locale-encoding-mapping><locale>zh_TW</locale><encoding>Big5</encoding></locale-encoding-mapping>+ </locale-encoding-mapping-list>+++ <!-- ==================================================================== -->+ <!-- JSR154 Stupidness -->+ <!-- This filter implements some of the JSR154 (servlet 2.4) "features", -->+ <!-- which are rather stupid and expensive to implement. Thus they are -->+ <!-- not included in the core Jetty architecture. It is HIGHLY -->+ <!-- RECOMMENDED that this filter NOT be used, unless you need: -->+ <!-- RequestAttributeListeners - If you actually have a real use for -->+ <!-- these, please tell the jetty lists what they are and why you -->+ <!-- can't use a normal filter/wrapper for this? -->+ <!-- SRV.6.2.2 Dispatachers - where the container cannot wrap the -->+ <!-- request or response. See -->+ <!-- http://jetty.mortbay.org/jetty/doc/servlet24.html#d0e711 -->+ <!-- to find out why this is stupid. -->+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->+ <!-- UNCOMMENT For compliant behaviour+ <filter>+ <filter-name>jsr154</filter-name>+ <filter-class>org.mortbay.jetty.servlet.JSR154Filter</filter-class>+ <init-param><param-name>unwrappedDispatch</param-name><param-value>true</param-value></init-param>+ </filter>+ <filter-mapping>+ <filter-name>jsr154</filter-name>+ <url-pattern>/*</url-pattern>+ <dispatcher>REQUEST</dispatcher>+ <dispatcher>FORWARD</dispatcher>+ <dispatcher>INCLUDE</dispatcher>+ <dispatcher>ERROR</dispatcher>+ </filter-mapping>+ -->++</web-app>+diff --git a/client/ruby/flare/solr/ext/ant.jar b/client/ruby/flare/solr/ext/ant.jarnew file mode 100644index 00000000000..f66b800e8fe--- /dev/null+++ b/client/ruby/flare/solr/ext/ant.jar@@ -0,0 +1,2 @@+AnyObjectId[395544dc9189fe11795250b48adda9e7f24c34bb] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/client/ruby/flare/solr/ext/commons-el.jar b/client/ruby/flare/solr/ext/commons-el.jarnew file mode 100644index 00000000000..c5b63457fe2--- /dev/null+++ b/client/ruby/flare/solr/ext/commons-el.jar@@ -0,0 +1,2 @@+AnyObjectId[608ed796ca34c5acc14cb3cf3cc4deee4ea86180] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/client/ruby/flare/solr/ext/commons-logging.jar b/client/ruby/flare/solr/ext/commons-logging.jarnew file mode 100644index 00000000000..f330fde2131--- /dev/null+++ b/client/ruby/flare/solr/ext/commons-logging.jar@@ -0,0 +1,2 @@+AnyObjectId[b73a80fab641131e6fbe3ae833549efb3c540d17] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/client/ruby/flare/solr/ext/jasper-compiler.jar b/client/ruby/flare/solr/ext/jasper-compiler.jarnew file mode 100644index 00000000000..48369df2d98--- /dev/null+++ b/client/ruby/flare/solr/ext/jasper-compiler.jar@@ -0,0 +1,2 @@+AnyObjectId[96ec53852d45e13723d8b40c83d99ed449a4c83e] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/client/ruby/flare/solr/ext/jasper-runtime.jar b/client/ruby/flare/solr/ext/jasper-runtime.jarnew file mode 100644index 00000000000..d0e39edbead--- /dev/null+++ b/client/ruby/flare/solr/ext/jasper-runtime.jar@@ -0,0 +1,2 @@+AnyObjectId[5c3b4bfff7a3bd377802548604a0b28bebab8ea7] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/client/ruby/flare/solr/ext/mx4j-remote.jar b/client/ruby/flare/solr/ext/mx4j-remote.jarnew file mode 100644index 00000000000..b7a97bebb93--- /dev/null+++ b/client/ruby/flare/solr/ext/mx4j-remote.jar@@ -0,0 +1,2 @@+AnyObjectId[de7739dba7f3f062240c87ffa37e81b00908ae33] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/client/ruby/flare/solr/ext/mx4j-tools.jar b/client/ruby/flare/solr/ext/mx4j-tools.jarnew file mode 100644index 00000000000..14324bdd6f7--- /dev/null+++ b/client/ruby/flare/solr/ext/mx4j-tools.jar@@ -0,0 +1,2 @@+AnyObjectId[87ccc77dd4e61e03d0b4b77265b8f62e7396d0ef] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/client/ruby/flare/solr/ext/mx4j.jar b/client/ruby/flare/solr/ext/mx4j.jarnew file mode 100644index 00000000000..f2eb43a7e2c--- /dev/null+++ b/client/ruby/flare/solr/ext/mx4j.jar@@ -0,0 +1,2 @@+AnyObjectId[e5dafc175ada7cf2d3e62cbd409541a8dcf7ad79] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/client/ruby/flare/solr/lib/javax.servlet.jar b/client/ruby/flare/solr/lib/javax.servlet.jarnew file mode 100644index 00000000000..ba6623bf6e0--- /dev/null+++ b/client/ruby/flare/solr/lib/javax.servlet.jar@@ -0,0 +1,2 @@+AnyObjectId[8092795672eb0d929e173a3de93c5093a828a78a] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/client/ruby/flare/solr/lib/org.mortbay.jetty.jar b/client/ruby/flare/solr/lib/org.mortbay.jetty.jarnew file mode 100644index 00000000000..13045763936--- /dev/null+++ b/client/ruby/flare/solr/lib/org.mortbay.jetty.jar@@ -0,0 +1,2 @@+AnyObjectId[186a190ce106d61d497e29c713e70ecf14667ef1] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/client/ruby/flare/solr/lib/org.mortbay.jmx.jar b/client/ruby/flare/solr/lib/org.mortbay.jmx.jarnew file mode 100644index 00000000000..f62f14599fc--- /dev/null+++ b/client/ruby/flare/solr/lib/org.mortbay.jmx.jar@@ -0,0 +1,2 @@+AnyObjectId[0561a2e877e10128a72424bb368902a11bdc94ab] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/client/ruby/flare/solr/solr/README.txt b/client/ruby/flare/solr/solr/README.txtnew file mode 100644index 00000000000..f39ad34db07--- /dev/null+++ b/client/ruby/flare/solr/solr/README.txt@@ -0,0 +1,52 @@+# 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.+++Example "Solr Home" Directory+=============================++This directory is provided as an example of what a "Solr Home" directory+should look like.++It's not strictly necessary that you copy all of the files in this+directory when setting up a new instance of Solr, but it is recommended.+++Basic Directory Structure+-------------------------++The Solr Home directory typically contains the following subdirectories...++ conf/+ This directory is mandatory and must contain your solrconfig.xml+ and schema.xml. Any other optional configuration files would also+ be kept here.++ data/+ This directory is the default location where Solr will keep your+ index, and is used by the replication scripts for dealing with+ snapshots. You can override this location in the solrconfig.xml+ and scripts.conf files. Solr will create this directory if it+ does not already exist.++ lib/+ This directory is optional. If it exists, Solr will load any Jars+ found in this directory and use them to resolve any "plugins"+ specified in your solrconfig.xml or schema.xml (ie: Analyzers,+ Request Handlers, etc...)++ bin/+ This directory is optional. It is the default location used for+ keeping the replication scripts.diff --git a/client/ruby/flare/solr/solr/bin/abc b/client/ruby/flare/solr/solr/bin/abcnew file mode 100755index 00000000000..be811ce8d40--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/abc@@ -0,0 +1,165 @@+#!/bin/bash+#+# 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.+#+# Shell script to make an Atomic Backup after Commit of+# a Solr Lucene collection.++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset solr_hostname solr_port data_dir webapp_name user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/${prog}.log++# define usage string+USAGE="\+usage: $prog [-h hostname] [-p port] [-d dir] [-w webappname] [-u username] [-v]+ -h specify Solr hostname+ -p specify Solr port number+ -d specify directory holding index data+ -w specify name of Solr webapp (defaults to solr)+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts h:p:d:w:u:vV OPTION+do+ case $OPTION in+ h)+ solr_hostname="$OPTARG"+ ;;+ p)+ solr_port="$OPTARG"+ ;;+ d)+ data_dir="$OPTARG"+ ;;+ w)+ webapp_name="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++if [[ -z ${solr_port} ]]+then+ echo "Solr port number missing in $confFile or command line."+ echo "$USAGE"+ exit 1+fi++# use default value for data_dir if not specified+# relative path starts at ${solr_root}+if [[ -z ${data_dir} ]]+then+ data_dir=${solr_root}/data+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]+then+ data_dir=${solr_root}/${data_dir}+fi++# use default hostname if not specified+if [[ -z ${solr_hostname} ]]+then+ solr_hostname=localhost+fi++# use default webapp name if not specified+if [[ -z ${webapp_name} ]]+then+ webapp_name=solr+fi++fixUser "$@"++start=`date +"%s"`++logMessage started by $oldwhoami+logMessage command: $0 $@++logMessage sending commit to Solr server at port ${solr_port}+rs=`curl http://${solr_hostname}:${solr_port}/solr/update -s -d "<commit/>"`+if [[ $? != 0 ]]+then+ logMessage failed to connect to Solr server at port ${solr_port}+ logMessage commit failed+ logExit failed 1+fi++# check status of commit request+echo $rs | grep '<result.*status="0"' > /dev/null 2>&1+if [[ $? != 0 ]]+then+ logMessage commit request to Solr at port ${solr_port} failed:+ logMessage $rs+ logExit failed 2+fi++# successful commit creates a snapshot file synchronously+lastsnap=`ls -drt1 ${data_dir}/snapshot.* 2> /dev/null | tail -1 `++if [[ $lastsnap == "" ]]+then+ logMessage commit did not create snapshot at port ${solr_port}, backup failed:+ logExit failed 3+fi++name=backup.${lastsnap##*snapshot.}+temp=temp-${name}++if [[ -d ${data_dir}/${name} ]]+then+ logMessage backup directory ${data_dir}/${name} already exists+ logExit aborted 1+fi++if [[ -d ${data_dir}/${temp} ]]+then+ logMessage backingup of ${data_dir}/${name} in progress+ logExit aborted 1+fi+logMessage making backup ${data_dir}/${name}++# clean up after INT/TERM+trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_dir}/${temp};logExit aborted 13' INT TERM++# make a backup using hard links into temporary location+# then move it into place atomically+cp -lr ${lastsnap} ${data_dir}/${temp}+mv ${data_dir}/${temp} ${data_dir}/${name}++logExit ended 0diff --git a/client/ruby/flare/solr/solr/bin/abo b/client/ruby/flare/solr/solr/bin/abonew file mode 100755index 00000000000..1e02658b3a6--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/abo@@ -0,0 +1,165 @@+#!/bin/bash+#+# 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.+#+# Shell script to make an Atomic Backup after Optimize of+# a Solr Lucene collection.++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset solr_hostname solr_port data_dir webapp_name user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/${prog}.log++# define usage string+USAGE="\+usage: $prog [-h hostname] [-p port] [-d dir] [-w webapp_name] [-u username] [-v]+ -h specify Solr hostname+ -p specify Solr port number+ -d specify directory holding index data+ -w specify name of Solr webapp (defaults to solr)+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts h:p:d:w:u:vV OPTION+do+ case $OPTION in+ h)+ solr_hostname="$OPTARG"+ ;;+ p)+ solr_port="$OPTARG"+ ;;+ d)+ data_dir="$OPTARG"+ ;;+ w)+ webapp_name="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++if [[ -z ${solr_port} ]]+then+ echo "Solr port number missing in $confFile or command line."+ echo "$USAGE"+ exit 1+fi++# use default value for data_dir if not specified+# relative path starts at ${solr_root}+if [[ -z ${data_dir} ]]+then+ data_dir=${solr_root}/data+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]+then+ data_dir=${solr_root}/${data_dir}+fi++# use default hostname if not specified+if [[ -z ${solr_hostname} ]]+then+ solr_hostname=localhost+fi++# use default webapp name if not specified+if [[ -z ${webapp_name} ]]+then+ webapp_name=solr+fi++fixUser "$@"++start=`date +"%s"`++logMessage started by $oldwhoami+logMessage command: $0 $@++logMessage sending optimize to Solr server at port ${solr_port}+rs=`curl http://${solr_hostname}:${solr_port}/solr/update -s -d "<optimize/>"`+if [[ $? != 0 ]]+then+ logMessage failed to connect to Solr server at port ${solr_port}+ logMessage optimize failed+ logExit failed 1+fi++# check status of optimize request+echo $rs | grep '<result.*status="0"' > /dev/null 2>&1+if [[ $? != 0 ]]+then+ logMessage optimize request to Solr at port ${solr_port} failed:+ logMessage $rs+ logExit failed 2+fi++# successful optimize creates a snapshot file synchronously+lastsnap=`ls -drt1 ${data_dir}/snapshot.* | tail -1 `++if [[ $lastsnap == "" ]]+then+ logMessage commit did not create snapshot at port ${solr_port}, backup failed:+ logExit failed 3+fi++name=backup.${lastsnap##*snapshot.}+temp=temp-${name}++if [[ -d ${data_dir}/${name} ]]+then+ logMessage backup directory ${data_dir}/${name} already exists+ logExit aborted 1+fi++if [[ -d ${data_dir}/${temp} ]]+then+ logMessage backingup of ${data_dir}/${name} in progress+ logExit aborted 1+fi+logMessage making backup ${data_dir}/${name}++# clean up after INT/TERM+trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_dir}/${temp};logExit aborted 13' INT TERM++# make a backup using hard links into temporary location+# then move it into place atomically+cp -lr ${lastsnap} ${data_dir}/${temp}+mv ${data_dir}/${temp} ${data_dir}/${name}++logExit ended 0diff --git a/client/ruby/flare/solr/solr/bin/backup b/client/ruby/flare/solr/solr/bin/backupnew file mode 100755index 00000000000..1fc3b185d9e--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/backup@@ -0,0 +1,108 @@+#!/bin/bash+#+# 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.+#+# Shell script to make a backup of a Solr Lucene collection.++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset data_dir user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/${prog}.log++# define usage string+USAGE="\+usage: $prog [-d dir] [-u username] [-v]+ -d specify directory holding index data+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts d:u:vV OPTION+do+ case $OPTION in+ d)+ data_dir="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++# use default value for data_dir if not specified+# relative path starts at ${solr_root}+if [[ -z ${data_dir} ]]+then+ data_dir=${solr_root}/data+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]+then+ data_dir=${solr_root}/${data_dir}+fi++fixUser "$@"++start=`date +"%s"`++logMessage started by $oldwhoami+logMessage command: $0 $@++name=backup.`date +"%Y%m%d%H%M%S"`+temp=temp-${name}++if [[ -d ${data_dir}/${name} ]]+then+ logMessage backup directory ${data_dir}/${name} already exists+ logExit aborted 1+fi++if [[ -d ${data_dir}/${temp} ]]+then+ logMessage backingup of ${data_dir}/${name} in progress+ logExit aborted 1+fi++# clean up after INT/TERM+trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_dir}/${temp};logExit aborted 13' INT TERM++logMessage making backup ${data_dir}/${name}++# make a backup using hard links into temporary location+# then move it into place atomically+cp -lr ${data_dir}/index ${data_dir}/${temp}+mv ${data_dir}/${temp} ${data_dir}/${name}++logExit ended 0+diff --git a/client/ruby/flare/solr/solr/bin/backupcleaner b/client/ruby/flare/solr/solr/bin/backupcleanernew file mode 100755index 00000000000..2d82f901100--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/backupcleaner@@ -0,0 +1,134 @@+#!/bin/bash+#+# 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.+#+# Shell script to clean up backups of a Solr Lucene collection.++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset days num data_dir user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/${prog}.log++# define usage string+USAGE="\+usage: $prog -D <days> | -N <num> [-d dir] [-u username] [-v]+ -D <days> cleanup backups more than <days> days old+ -N <num> keep the most recent <num> number of backups and+ cleanup up the remaining ones that are not being pulled+ -d specify directory holding index data+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts D:N:d:u:vV OPTION+do+ case $OPTION in+ D)+ days="$OPTARG"+ ;;+ N)+ num="$OPTARG"+ ;;+ d)+ data_dir="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++if [[ -z ${days} && -z ${num} ]]+then+ echo "$USAGE"+ exit 1+fi++fixUser "$@"++# use default value for data_dir if not specified+# relative path starts at ${solr_root}+if [[ -z ${data_dir} ]]+then+ data_dir=${solr_root}/data+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]+then+ data_dir=${solr_root}/${data_dir}+fi++function remove+{+ logMessage removing backup $1+ /bin/rm -rf $1+}++start=`date +"%s"`++logMessage started by $oldwhoami+logMessage command: $0 $@++# trap control-c+trap 'echo "caught INT/TERM, exiting now but partial cleanup may have already occured";logExit aborted 13' INT TERM++if [[ -n ${days} ]]+then+ logMessage cleaning up backups more than ${days} days old+ for i in `find ${data_dir} -name "backup.*" -maxdepth 1 -mtime +${days} -print`+ do+ remove $i+ done+elif [[ -n ${num} ]]+then+ logMessage cleaning up all backups except for the most recent ${num} ones+ unset backups count+ backups=`ls -cd ${data_dir}/backup.* 2>/dev/null`+ if [[ $? == 0 ]]+ then+ count=`echo $backups|wc -w`+ startpos=`expr $num + 1`+ if [[ $count -gt $num ]]+ then+ for i in `echo $backups|cut -f${startpos}- -d" "`+ do+ remove $i+ done+ fi+ fi+fi++logExit ended 0++diff --git a/client/ruby/flare/solr/solr/bin/commit b/client/ruby/flare/solr/solr/bin/commitnew file mode 100755index 00000000000..3c3391b5576--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/commit@@ -0,0 +1,119 @@+#!/bin/bash+#+# 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.+#+# Shell script to force a commit of all changes since last commit+# for a Solr server++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset solr_hostname solr_port webapp_name user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/${prog}.log++# define usage string+USAGE="\+usage: $prog [-h hostname] [-p port] [-w webapp_name] [-u username] [-v]+ -h specify Solr hostname+ -p specify Solr port number+ -w specify name of Solr webapp (defaults to solr)+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts h:p:w:u:vV OPTION+do+ case $OPTION in+ h)+ solr_hostname="$OPTARG"+ ;;+ p)+ solr_port="$OPTARG"+ ;;+ w)+ webapp_name="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++if [[ -z ${solr_port} ]]+then+ echo "Solr port number missing in $confFile or command line."+ echo "$USAGE"+++ exit 1+fi++# use default hostname if not specified+if [[ -z ${solr_hostname} ]]+then+ solr_hostname=localhost+fi++# use default webapp name if not specified+if [[ -z ${webapp_name} ]]+then+ webapp_name=solr+fi++fixUser "$@"++start=`date +"%s"`++logMessage started by $oldwhoami+logMessage command: $0 $@++rs=`curl http://${solr_hostname}:${solr_port}/solr/update -s -d "<commit/>"`+if [[ $? != 0 ]]+then+ logMessage failed to connect to Solr server at port ${solr_port}+ logMessage commit failed+ logExit failed 1+fi++# check status of commit request+echo $rs | grep '<result.*status="0"' > /dev/null 2>&1+if [[ $? != 0 ]]+then+ logMessage commit request to Solr at port ${solr_port} failed:+ logMessage $rs+ logExit failed 2+fi++logExit ended 0diff --git a/client/ruby/flare/solr/solr/bin/optimize b/client/ruby/flare/solr/solr/bin/optimizenew file mode 100755index 00000000000..3a67dd93822--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/optimize@@ -0,0 +1,118 @@+#!/bin/bash+#+# 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.+#+# Shell script to force a optimized commit of all changes since last commit+# for a Solr server++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset solr_hostname solr_port webapp_name user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/${prog}.log++# define usage string+USAGE="\+usage: $prog [-h hostname] [-p port] [-u username] [-v]+ -h specify Solr hostname+ -p specify Solr port number+ -w specify name of Solr webapp (defaults to solr)+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+originalargs="$@"+while getopts h:p:w:u:vV OPTION+do+ case $OPTION in+ h)+ solr_hostname="$OPTARG"+ ;;+ p)+ solr_port="$OPTARG"+ ;;+ w)+ webapp_name="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++if [[ -z ${solr_port} ]]+then+ echo "Solr port number missing in $confFile or command line."+ echo "$USAGE"+ exit 1+fi++# use default hostname if not specified+if [[ -z ${solr_hostname} ]]+then+ solr_hostname=localhost+fi++# use default webapp name if not specified+if [[ -z ${webapp_name} ]]+then+ webapp_name=solr+fi++fixUser "$@"++start=`date +"%s"`++logMessage started by $oldwhoami+logMessage command: $0 $@++rs=`curl http://${solr_hostname}:${solr_port}/solr/update -s -d "<optimize/>"`+if [[ $? != 0 ]]+then+ logMessage failed to connect to Solr server at port ${solr_port}+ logMessage optimize failed+ logExit failed 1+fi++# check status of optimize request+echo $rs | grep '<response.*status="0"' > /dev/null 2>&1+if [[ $? != 0 ]]+then+ logMessage optimize request to Solr at port ${solr_port} failed:+ logMessage $rs+ logExit failed 2+fi++logExit ended 0diff --git a/client/ruby/flare/solr/solr/bin/readercycle b/client/ruby/flare/solr/solr/bin/readercyclenew file mode 100755index 00000000000..fdb8c152b61--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/readercycle@@ -0,0 +1,118 @@+#!/bin/bash+#+# 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.+#+# Shell script to force all old readers closed and a new reader to be opened+# for a Solr server++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset solr_hostname solr_port webapp_name user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/${prog}.log++# define usage string+USAGE="\+usage: $prog [-p hostname] [-p port] [-w webapp_name] [-u username] [-v]+ -h specify Solr hostname+ -p specify Solr port number+ -w specify name of Solr webapp (defaults to solr)+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+originalargs="$@"+while getopts h:p:w:u:vV OPTION+do+ case $OPTION in+ h)+ solr_hostname="$OPTARG"+ ;;+ p)+ solr_port="$OPTARG"+ ;;+ w)+ webapp_name="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++if [[ -z ${solr_port} ]]+then+ echo "Solr port number missing in $confFile or command line."+ echo "$USAGE"+ exit 1+fi++# use default hostname if not specified+if [[ -z ${solr_hostname} ]]+then+ solr_hostname=localhost+fi++# use default webapp name if not specified+if [[ -z ${webapp_name} ]]+then+ webapp_name=solr+fi++fixUser "$@"++start=`date +"%s"`++logMessage started by $oldwhoami+logMessage command: $0 $@++rs=`curl http://${solr_hostname}:${solr_port}/solr/update -s -d "<commit/>"`+if [[ $? != 0 ]]+then+ logMessage failed to connect to Solr server at port ${solr_port}+ logMessage reader cycle failed+ logExit failed 1+fi++# check status of commit request+echo $rs | grep '<response.*status="0"' > /dev/null 2>&1+if [[ $? != 0 ]]+then+ logMessage reader cycle request to Solr at port ${solr_port} failed:+ logMessage $rs+ logExit failed 2+fi++logExit ended 0diff --git a/client/ruby/flare/solr/solr/bin/rsyncd-disable b/client/ruby/flare/solr/solr/bin/rsyncd-disablenew file mode 100755index 00000000000..4affdac8552--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/rsyncd-disable@@ -0,0 +1,77 @@+#!/bin/bash+#+# 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.+#+# Shell script to disable rsyncd++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/rsyncd.log++# define usage string+USAGE="\+usage: $prog [-u username] [-v]+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts u:vV OPTION+do+ case $OPTION in+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++fixUser "$@"++start=`date +"%s"`++logMessage disabled by $oldwhoami+logMessage command: $0 $@+name=${solr_root}/logs/rsyncd-enabled++if [[ -f ${name} ]]+then+ rm -f ${name}+else+ logMessage rsyncd not currently enabled+ logExit exited 1+fi++logExit ended 0diff --git a/client/ruby/flare/solr/solr/bin/rsyncd-enable b/client/ruby/flare/solr/solr/bin/rsyncd-enablenew file mode 100755index 00000000000..da2a97a59aa--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/rsyncd-enable@@ -0,0 +1,76 @@+#!/bin/bash+#+# 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.+#+# Shell script to enable rsyncd++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+log=${solr_root}/logs/rsyncd.log++# define usage string+USAGE="\+usage: $prog [-u username] [-v]+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts u:vV OPTION+do+ case $OPTION in+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++fixUser "$@"++start=`date +"%s"`++logMessage enabled by $oldwhoami+logMessage command: $0 $@+name=${solr_root}/logs/rsyncd-enabled++if [[ -f ${name} ]]+then+ logMessage rsyncd already currently enabled+ logExit exited 1+else+ touch ${name}+fi++logExit ended 0diff --git a/client/ruby/flare/solr/solr/bin/rsyncd-start b/client/ruby/flare/solr/solr/bin/rsyncd-startnew file mode 100755index 00000000000..6bfc130c2ab--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/rsyncd-start@@ -0,0 +1,145 @@+#!/bin/bash+#+# 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.+#+# Shell script to start rsyncd on master Solr server++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset data_dir solr_port rsyncd_port user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/rsyncd.log++# define usage string+USAGE="\+usage: $prog [-d dir] [-p portnum] [-u username] [-v]+ -d specify directory holding index data+ -p specify rsyncd port number+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts d:p:u:vV OPTION+do+ case $OPTION in+ d)+ data_dir="$OPTARG"+ ;;+ p)+ rsyncd_port="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++fixUser "$@"++# try to determine rsyncd port number from $confFile if not specified on+# command line, default to solr_port+10000+if [[ -z ${rsyncd_port} ]]+then+ if [[ "${solr_port}" ]]+ then+ rsyncd_port=`expr 10000 + ${solr_port}`+ else+ echo "rsyncd port number missing in $confFile or command line."+ echo "$USAGE"+ exit 1+ fi+fi++# use default value for data_dir if not specified+# relative path starts at ${solr_root}+if [[ -z ${data_dir} ]]+then+ data_dir=${solr_root}/data+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]+then+ data_dir=${solr_root}/${data_dir}+fi++logMessage started by $oldwhoami+logMessage command: $0 $@++if [[ ! -f ${solr_root}/logs/rsyncd-enabled ]]+then+ logMessage rsyncd disabled+ exit 1+fi++if \+ rsync rsync://localhost:${rsyncd_port} >/dev/null 2>&1+then+ logMessage "rsyncd already running at port ${rsyncd_port}"+ exit 1+fi++# create conf/rsyncd.conf on the fly, creating solrlogs directory if needed+if [[ ! -d ${solr_root}/conf ]]+then+ mkdir ${solr_root}/conf+fi+cat <<EOF > ${solr_root}/conf/rsyncd.conf+#### rsyncd.conf file ####++uid = $(whoami)+gid = $(whoami)+use chroot = no+list = no+pid file = ${solr_root}/logs/rsyncd.pid+log file = ${solr_root}/logs/rsyncd.log+[solr]+ path = ${data_dir}+ comment = Solr+EOF++rsync --daemon --port=${rsyncd_port} --config=${solr_root}/conf/rsyncd.conf++# first make sure rsyncd is accepting connections+i=1+while \+ ! rsync rsync://localhost:${rsyncd_port} >/dev/null 2>&1+do+ if (( i++ > 15 ))+ then+ logMessage "rsyncd not accepting connections, exiting" >&2+ exit 2+ fi+ sleep 1+done++logMessage rsyncd started with data_dir=${data_dir} and accepting requestsdiff --git a/client/ruby/flare/solr/solr/bin/rsyncd-stop b/client/ruby/flare/solr/solr/bin/rsyncd-stopnew file mode 100755index 00000000000..d19b054cffa--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/rsyncd-stop@@ -0,0 +1,105 @@+#!/bin/bash+#+# 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.+#+# Shell script to stop rsyncd on master Solr server++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/rsyncd.log++# define usage string+USAGE="\+usage: $prog [-u username] [-v]+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts u:vV OPTION+do+ case $OPTION in+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++fixUser "$@"++logMessage stopped by $oldwhoami+logMessage command: $0 $@++# look for pid file+if [[ ! -f ${solr_root}/logs/rsyncd.pid ]]+then+ logMessage "missing rsyncd pid file ${solr_root}/logs/rsyncd.pid"+ exit 2+fi++# get PID from file+pid=$(<${solr_root}/logs/rsyncd.pid)+if [[ -z $pid ]]+then+ logMessage "unable to get rsyncd's PID"+ exit 2+fi++kill $pid++# wait until rsyncd dies or we time out+dead=0+timer=0+timeout=300+while (( ! dead && timer < timeout ))+do+ if ps -eo pid | grep -qw $pid+ then+ kill $pid+ (( timer++ ))+ sleep 1+ else+ dead=1+ fi+done+if ps -eo pid | grep -qw $pid+then+ logMessage rsyncd failed to stop after $timeout seconds+ exit 3+fi++# remove rsyncd.conf+/bin/rm -f ${solr_root}/conf/rsyncd.confdiff --git a/client/ruby/flare/solr/solr/bin/scripts-util b/client/ruby/flare/solr/solr/bin/scripts-utilnew file mode 100755index 00000000000..953bcc81efb--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/scripts-util@@ -0,0 +1,83 @@+#!/bin/bash+#+# 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.+#+# util functions used by scripts++export PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH++# set up variables+prog=${0##*/}++# source the config file if present+confFile=${solr_root}/conf/scripts.conf+if [[ -f $confFile ]]+then+ . $confFile+fi++function fixUser+{+# set user to $(whoami) if not specified+ if [[ -z ${user} ]]+ then+ user=$(whoami)+ fi++# sudo+ if [[ $(whoami) != ${user} ]]+ then+ sudo -u ${user} $0 "$@"+ exit $?+ fi++ oldwhoami=$(who -m | cut -d' ' -f1 | sed -e's/^.*!//')++ if [[ "${oldwhoami}" == "" ]]+ then+ oldwhoami=`ps h -Hfp $(pgrep -g0 ${0##*/}) | tail -1|cut -f1 -d" "`+ fi+}++function timeStamp+{+ date +'%Y/%m/%d %H:%M:%S'+}++function logMessage+{+ echo $(timeStamp) $@>>$log+ if [[ -n ${verbose} ]]+ then+ echo $@+ fi+}++function logExit+{+ end=`date +"%s"`+ diff=`expr $end - $start`+ echo "$(timeStamp) $1 (elapsed time: $diff sec)">>$log+ exit $2+}++# create logs directory if not there+if [[ ! -d ${solr_root}/logs ]]+then+ mkdir ${solr_root}/logs+fi++umask 002diff --git a/client/ruby/flare/solr/solr/bin/snapcleaner b/client/ruby/flare/solr/solr/bin/snapcleanernew file mode 100755index 00000000000..e2903077a93--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/snapcleaner@@ -0,0 +1,140 @@+#!/bin/bash+#+# 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.+#+# Shell script to clean up snapshots of a Solr Lucene collection.++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset days num data_dir user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/${prog}.log++# define usage string+USAGE="\+usage: $prog -D <days> | -N <num> [-d dir] [-u username] [-v]+ -D <days> cleanup snapshots more than <days> days old+ -N <num> keep the most recent <num> number of snapshots and+ cleanup up the remaining ones that are not being pulled+ -d specify directory holding index data+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts D:N:d:u:vV OPTION+do+ case $OPTION in+ D)+ days="$OPTARG"+ ;;+ N)+ num="$OPTARG"+ ;;+ d)+ data_dir="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++if [[ -z ${days} && -z ${num} ]]+then+ echo "$USAGE"+ exit 1+fi++fixUser "$@"++# use default value for data_dir if not specified+# relative path starts at ${solr_root}+if [[ -z ${data_dir} ]]+then+ data_dir=${solr_root}/data+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]+then+ data_dir=${solr_root}/${data_dir}+fi++function remove+{+ syncing=`ps -fwwwu ${user}|grep -w rsync|grep -v grep|grep -w $1`+ if [[ -n $syncing ]]+ then+ logMessage $1 not removed - rsync in progress+ else+ logMessage removing snapshot $1+ /bin/rm -rf $1+ fi+}++start=`date +"%s"`++logMessage started by $oldwhoami+logMessage command: $0 $@++# trap control-c+trap 'echo "caught INT/TERM, exiting now but partial cleanup may have already occured";logExit aborted 13' INT TERM++if [[ -n ${days} ]]+then+ logMessage cleaning up snapshots more than ${days} days old+ for i in `find ${data_dir} -name "snapshot.*" -maxdepth 1 -mtime +${days} -print`+ do+ remove $i+ done+elif [[ -n ${num} ]]+then+ logMessage cleaning up all snapshots except for the most recent ${num} ones+ unset snapshots count+ snapshots=`ls -cd ${data_dir}/snapshot.* 2>/dev/null`+ if [[ $? == 0 ]]+ then+ count=`echo $snapshots|wc -w`+ startpos=`expr $num + 1`+ if [[ $count -gt $num ]]+ then+ for i in `echo $snapshots|cut -f${startpos}- -d" "`+ do+ remove $i+ done+ fi+ fi+fi++logExit ended 0++diff --git a/client/ruby/flare/solr/solr/bin/snapinstaller b/client/ruby/flare/solr/solr/bin/snapinstallernew file mode 100755index 00000000000..f15f2f872a8--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/snapinstaller@@ -0,0 +1,166 @@+#!/bin/bash+#+# 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.+#+# Shell script to install a snapshot into place as the Lucene collection+# for a Solr server++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset master_host master_status_dir data_dir user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/${prog}.log++# define usage string+USAGE="\+usage: $prog [-M master] [-S sdir] [-d dir] [-u username] [-v]+ -M master specify hostname of master server from where to pull index+ snapshot+ -S specify directory holding snapshot status on master server+ -d specify directory holding index data on local machine+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts M:S:d:u:vV OPTION+do+ case $OPTION in+ M)+ master_host="$OPTARG"+ ;;+ S)+ master_status_dir="$OPTARG"+ ;;+ d)+ data_dir="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++if [[ -z ${master_host} ]]+then+ echo "name of master server missing in $confFile or command line."+ echo "$USAGE"+ exit 1+fi++if [[ -z ${master_status_dir} ]]+then+ echo "directory holding snapshot status on master server missing in $confFile or command line."+ echo "$USAGE"+ exit 1+fi++fixUser "$@"++# use default value for data_dir if not specified+# relative path starts at ${solr_root}+if [[ -z ${data_dir} ]]+then+ data_dir=${solr_root}/data+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]+then+ data_dir=${solr_root}/${data_dir}+fi++# assume relative path to start at ${solr_root}+if [[ "`echo ${master_status_dir}|cut -c1`" != "/" ]]+then+ master_status_dir=${solr_root}/${master_status_dir}+fi++start=`date +"%s"`++logMessage started by $oldwhoami+logMessage command: $0 $@++# get directory name of latest snapshot+name=`find ${data_dir} -name snapshot.* -print|grep -v wip|sort -r|head -1`++# clean up after INT/TERM+trap 'echo "caught INT/TERM, exiting now but partial installation may have already occured";/bin/rm -rf ${data_dir"/index.tmp$$;logExit aborted 13' INT TERM++# is there a snapshot+if [[ "${name}" == "" ]]+then+ logMessage no shapshot available+ logExit ended 0+fi++# has snapshot already been installed+if [[ ${name} == `cat ${solr_root}/logs/snapshot.current 2>/dev/null` ]]+then+ logMessage latest snapshot ${name} already installed+ logExit ended 0+fi++# make sure master has directory for hold slaves stats/state+if+ ! ssh -o StrictHostKeyChecking=no ${master_host} mkdir -p ${master_status_dir}+then+ logMessage failed to ssh to master ${master_host}, snapshot status not updated on master+fi++# install using hard links into temporary directory+# remove original index and then atomically copy new one into place+logMessage installing snapshot ${name}+cp -lr ${name}/ ${data_dir}/index.tmp$$+/bin/rm -rf ${data_dir}/index+mv -f ${data_dir}/index.tmp$$ ${data_dir}/index++# update distribution stats+echo ${name} > ${solr_root}/logs/snapshot.current++# push stats/state to master+if+ ! scp -q -o StrictHostKeyChecking=no ${solr_root}/logs/snapshot.current ${master_host}:${master_status_dir}/snapshot.current.`uname -n`+then+ logMessage failed to ssh to master ${master_host}, snapshot status not updated on master+fi++# notify Solr to open a new Searcher+logMessage notifing Solr to open a new Searcher+${solr_root}/bin/commit+if [[ $? != 0 ]]+then+ logMessage failed to connect to Solr server+ logMessage snapshot installed but Solr server has not open a new Searcher+ logExit failed 1+fi++logExit ended 0diff --git a/client/ruby/flare/solr/solr/bin/snappuller b/client/ruby/flare/solr/solr/bin/snappullernew file mode 100755index 00000000000..2b8ae2c843b--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/snappuller@@ -0,0 +1,248 @@+#!/bin/bash+#+# 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.+#+# Shell script to copy snapshots of a Solr Lucene collection from the master++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset master_host rsyncd_port master_data_dir master_status_dir snap_name+unset sizeonly stats data_dir user verbose debug compress startStatus+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/${prog}.log++# define usage string+USAGE="\+usage: $prog [-M master] [-P portnum] [-D mdir] [-S sdir] [-n snapshot] [-d dir] [-u username] [-svz]+ -M master specify hostname of master server from where to pull index+ snapshot+ -P port specify rsyncd port number of master server from where to+ pull index snapshot+ -D specify directory holding index data on master server+ -S specify directory holding snapshot status on master server+ -n snapshot pull a specific snapshot by name+ -d specify directory holding index data on local machine+ -u specify user to sudo to before running script+ -s use the --size-only option with rsync+ -v increase verbosity (-vv show file transfer stats also)+ -V output debugging info+ -z enable compression of data+"++# parse args+while getopts M:P:D:S:n:d:u:svVz OPTION+do+ case $OPTION in+ M)+ master_host="$OPTARG"+ ;;+ P)+ rsyncd_port="$OPTARG"+ ;;+ D)+ master_data_dir="$OPTARG"+ ;;+ S)+ master_status_dir="$OPTARG"+ ;;+ n)+ snap_name="$OPTARG"+ ;;+ d)+ data_dir="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ s)+ sizeonly="--size-only"+ ;;+ v)+ [[ -n $verbose ]] && stats="--stats" || verbose=v+ ;;+ V)+ debug="V"+ ;;+ z)+ compress="z"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++if [[ -z ${master_host} ]]+then+ echo "name of master server missing in $confFile or command line."+ echo "$USAGE"+ exit 1+fi++# try to determine rsyncd port number from $confFile if not specified on+# command line, default to solr_port+10000+if [[ -z ${rsyncd_port} ]]+then+ if [[ "${solr_port}" ]]+ then+ rsyncd_port=`expr 10000 + ${solr_port}`+ else+ echo "rsyncd port number of master server missing in $confFile or command line."+ echo "$USAGE"+ exit 1+ fi+fi++if [[ -z ${master_data_dir} ]]+then+ echo "directory holding index data on master server missing in $confFile or command line."+ echo "$USAGE"+ exit 1+fi++if [[ -z ${master_status_dir} ]]+then+ echo "directory holding snapshot status on master server missing in $confFile or command line."+ echo "$USAGE"+ exit 1+fi++fixUser "$@"++# use default value for data_dir if not specified+# relative path starts at ${solr_root}+if [[ -z ${data_dir} ]]+then+ data_dir=${solr_root}/data+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]+then+ data_dir=${solr_root}/${data_dir}+fi++# assume relative path to start at ${solr_root}+if [[ "`echo ${master_data_dir}|cut -c1`" != "/" ]]+then+ master_data_dir=${solr_root}/${master_data_dir}+fi+if [[ "`echo ${master_status_dir}|cut -c1`" != "/" ]]+then+ master_status_dir=${solr_root}/${master_status_dir}+fi++# push stats/state to master if necessary+function pushStatus+{+ scp -q -o StrictHostKeyChecking=no ${solr_root}/logs/snappuller.status ${master_host}:${master_status_dir}/snapshot.status.`uname -n`+}++start=`date +"%s"`++logMessage started by $oldwhoami+logMessage command: $0 $@++if [[ ! -f ${solr_root}/logs/snappuller-enabled ]]+then+ logMessage snappuller disabled+ exit 1+fi++# make sure we can ssh to master+if+ ! ssh -o StrictHostKeyChecking=no ${master_host} id 1>/dev/null 2>&1+then+ logMessage failed to ssh to master ${master_host}+ exit 1+fi++# get directory name of latest snapshot if not specified on command line+if [[ -z ${snap_name} ]]+then+ snap_name=`ssh -o StrictHostKeyChecking=no ${master_host} "find ${master_data_dir} -name snapshot.\* -print"|grep -v wip|sort -r|head -1`+fi+if [[ "${snap_name}" == "" ]]+then+ logMessage no snapshot available on ${master_host} in ${master_data_dir}+ logExit ended 0+else+ name=`basename ${snap_name}`+fi++# clean up after INT/TERM+trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_dir}/${name}-wip;echo ${startStatus} aborted:$(timeStamp)>${solr_root}/logs/snappuller.status;pushStatus;logExit aborted 13' INT TERM++if [[ -d ${data_dir}/${name} || -d ${data_dir}/${name}-wip ]]+then+ logMessage no new snapshot available on ${master_host} in ${master_data_dir}+ logExit ended 0+fi++# take a snapshot of current index so that only modified files will be rsync-ed+# put the snapshot in the 'work-in-progress" directory to prevent it from+# being installed while the copying is still in progress+cp -lr ${data_dir}/index ${data_dir}/${name}-wip+# force rsync of segments and .del files since we are doing size-only+if [[ -n ${sizeonly} ]]+then+ rm -f ${data_dir}/${name}-wip/segments+ rm -f ${data_dir}/${name}-wip/*.del+fi++logMessage pulling snapshot ${name}++# make sure master has directory for hold slaves stats/state+ssh -o StrictHostKeyChecking=no ${master_host} mkdir -p ${master_status_dir}++# start new distribution stats+rsyncStart=`date`+startTimestamp=`date -d "$rsyncStart" +'%Y%m%d-%H%M%S'`+rsyncStartSec=`date -d "$rsyncStart" +'%s'`+startStatus="rsync of `basename ${name}` started:$startTimestamp"+echo ${startStatus} > ${solr_root}/logs/snappuller.status+pushStatus++# rsync over files that have changed+rsync -Wa${verbose}${compress} --delete ${sizeonly} \+${stats} rsync://${master_host}:${rsyncd_port}/solr/${name}/ ${data_dir}/${name}-wip++rc=$?+rsyncEnd=`date`+endTimestamp=`date -d "$rsyncEnd" +'%Y%m%d-%H%M%S'`+rsyncEndSec=`date -d "$rsyncEnd" +'%s'`+elapsed=`expr $rsyncEndSec - $rsyncStartSec`+if [[ $rc != 0 ]]+then+ logMessage rsync failed+ /bin/rm -rf ${data_dir}/${name}-wip+ echo ${startStatus} failed:$endTimestamp > ${solr_root}/logs/snappuller.status+ pushStatus+ logExit failed 1+fi++# move into place atomically+mv ${data_dir}/${name}-wip ${data_dir}/${name}++# finish new distribution stats`+echo ${startStatus} ended:$endTimestamp rsync-elapsed:${elapsed} > ${solr_root}/logs/snappuller.status+pushStatus+logExit ended 0diff --git a/client/ruby/flare/solr/solr/bin/snappuller-disable b/client/ruby/flare/solr/solr/bin/snappuller-disablenew file mode 100755index 00000000000..9bf3f836eca--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/snappuller-disable@@ -0,0 +1,77 @@+#!/bin/bash+#+# 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.+#+# Shell script to disable snappuller++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/snappuller.log++# define usage string+USAGE="\+usage: $prog [-u username] [-v]+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts u:vV OPTION+do+ case $OPTION in+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++fixUser "$@"++start=`date +"%s"`++logMessage disabled by $oldwhoami+logMessage command: $0 $@+name=${solr_root}/logs/snappuller-enabled++if [[ -f ${name} ]]+then+ rm -f ${name}+else+ logMessage snappuller not currently enabled+ logExit exited 1+fi++logExit ended 0diff --git a/client/ruby/flare/solr/solr/bin/snappuller-enable b/client/ruby/flare/solr/solr/bin/snappuller-enablenew file mode 100755index 00000000000..b379ba13a5f--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/snappuller-enable@@ -0,0 +1,77 @@+#!/bin/bash+#+# 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.+#+# Shell script to enable snappuller++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/snappuller.log++# define usage string+USAGE="\+usage: $prog [-u username] [-v]+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts u:vV OPTION+do+ case $OPTION in+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++fixUser "$@"++start=`date +"%s"`++logMessage enabled by $oldwhoami+logMessage command: $0 $@+name=${solr_root}/logs/snappuller-enabled++if [[ -f ${name} ]]+then+ logMessage snappuller already currently enabled+ logExit exited 1+else+ touch ${name}+fi++logExit ended 0diff --git a/client/ruby/flare/solr/solr/bin/snapshooter b/client/ruby/flare/solr/solr/bin/snapshooternew file mode 100755index 00000000000..f172f7c2b0f--- /dev/null+++ b/client/ruby/flare/solr/solr/bin/snapshooter@@ -0,0 +1,109 @@+#!/bin/bash+#+# 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.+#+# Shell script to take a snapshot of a Solr Lucene collection.++orig_dir=$(pwd)+cd ${0%/*}/..+solr_root=$(pwd)+cd ${orig_dir}++unset data_dir user verbose debug+. ${solr_root}/bin/scripts-util++# set up variables+prog=${0##*/}+log=${solr_root}/logs/${prog}.log++# define usage string+USAGE="\+usage: $prog [-d dir] [-u username] [-v]+ -d specify directory holding index data+ -u specify user to sudo to before running script+ -v increase verbosity+ -V output debugging info+"++# parse args+while getopts d:u:vV OPTION+do+ case $OPTION in+ d)+ data_dir="$OPTARG"+ ;;+ u)+ user="$OPTARG"+ ;;+ v)+ verbose="v"+ ;;+ V)+ debug="V"+ ;;+ *)+ echo "$USAGE"+ exit 1+ esac+done++[[ -n $debug ]] && set -x++fixUser "$@"++# use default value for data_dir if not specified+# relative path starts at ${solr_root}+if [[ -z ${data_dir} ]]+then+ data_dir=${solr_root}/data+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]+then+ data_dir=${solr_root}/${data_dir}+fi++start=`date +"%s"`++logMessage started by $oldwhoami+logMessage command: $0 $@++snap_name=snapshot.`date +"%Y%m%d%H%M%S"`+name=${data_dir}/${snap_name}+temp=${data_dir}/temp-${snap_name}++if [[ -d ${name} ]]+then+ logMessage snapshot directory ${name} already exists+ logExit aborted 1+fi++if [[ -d ${temp} ]]+then+ logMessage snapshoting of ${name} in progress+ logExit aborted 1+fi++# clean up after INT/TERM+trap 'echo cleaning up, please wait ...;/bin/rm -rf ${name} ${temp};logExit aborted 13' INT TERM++logMessage taking snapshot ${name}++# take a snapshot using hard links into temporary location+# then move it into place atomically+cp -lr ${data_dir}/index ${temp}+mv ${temp} ${name}++logExit ended 0+diff --git a/client/ruby/flare/solr/solr/conf/admin-extra.html b/client/ruby/flare/solr/solr/conf/admin-extra.htmlnew file mode 100644index 00000000000..aa739da862c--- /dev/null+++ b/client/ruby/flare/solr/solr/conf/admin-extra.html@@ -0,0 +1,31 @@+<!--+ 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.+-->++<!-- The content of this page will be statically included into the top+of the admin page. Uncomment this as an example to see there the content+will show up.++<hr>+<i>This line will appear before the first table</i>+<tr>+<td colspan="2">+This row will be appended to the end of the first table+</td>+</tr>+<hr>++-->diff --git a/client/ruby/flare/solr/solr/conf/protwords.txt b/client/ruby/flare/solr/solr/conf/protwords.txtnew file mode 100644index 00000000000..1dfc0abecbf--- /dev/null+++ b/client/ruby/flare/solr/solr/conf/protwords.txt@@ -0,0 +1,21 @@+# 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.++#-----------------------------------------------------------------------+# Use a protected word file to protect against the stemmer reducing two+# unrelated words to the same base word.++# Some non-words that normally won't be encountered,+# just to test that they won't be stemmed.+dontstems+zwhacky+diff --git a/client/ruby/flare/solr/solr/conf/schema.xml b/client/ruby/flare/solr/solr/conf/schema.xmlnew file mode 100755index 00000000000..3d05e0e330c--- /dev/null+++ b/client/ruby/flare/solr/solr/conf/schema.xml@@ -0,0 +1,251 @@+<?xml version="1.0" ?>+<!--+ 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.+-->++<!-- This is the Solr schema file. This file should be named "schema.xml" and+ should be in the conf directory under the solr home+ (i.e. ./solr/conf/schema.xml by default)+ or located where the classloader for the Solr webapp can find it.++ For more information, on how to customize this file, please see+ http://wiki.apache.org/solr/SchemaXml+-->++<schema name="flare" version="1.1">+ <!-- attribute "name" is the name of this schema and is only used for display purposes.+ Applications should change this to reflect the nature of the search collection.+ version="1.1" is Solr's version number for the schema syntax and semantics. It should+ not normally be changed by applications.+ 1.0: multiValued attribute did not exist, all fields are multiValued by nature+ 1.1: multiValued attribute introduced, false by default -->++ <types>+ <!-- field type definitions. The "name" attribute is+ just a label to be used by field definitions. The "class"+ attribute and any other attributes determine the real+ behavior of the fieldtype.+ Class names starting with "solr" refer to java classes in the+ org.apache.solr.analysis package.+ -->++ <!-- The StrField type is not analyzed, but indexed/stored verbatim.+ - StrField and TextField support an optional compressThreshold which+ limits compression (if enabled in the derived fields) to values which+ exceed a certain size (in characters).+ -->+ <fieldtype name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>++ <!-- boolean type: "true" or "false" -->+ <fieldtype name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>++ <!-- The optional sortMissingLast and sortMissingFirst attributes are+ currently supported on types that are sorted internally as strings.+ - If sortMissingLast="true", then a sort on this field will cause documents+ without the field to come after documents with the field,+ regardless of the requested sort order (asc or desc).+ - If sortMissingFirst="true", then a sort on this field will cause documents+ without the field to come before documents with the field,+ regardless of the requested sort order.+ - If sortMissingLast="false" and sortMissingFirst="false" (the default),+ then default lucene sorting will be used which places docs without the+ field first in an ascending sort and last in a descending sort.+ -->+++ <!-- numeric field types that store and index the text+ value verbatim (and hence don't support range queries, since the+ lexicographic ordering isn't equal to the numeric ordering) -->+ <fieldtype name="integer" class="solr.IntField" omitNorms="true"/>+ <fieldtype name="long" class="solr.LongField" omitNorms="true"/>+ <fieldtype name="float" class="solr.FloatField" omitNorms="true"/>+ <fieldtype name="double" class="solr.DoubleField" omitNorms="true"/>+++ <!-- Numeric field types that manipulate the value into+ a string value that isn't human-readable in its internal form,+ but with a lexicographic ordering the same as the numeric ordering,+ so that range queries work correctly. -->+ <fieldtype name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>+ <fieldtype name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>+ <fieldtype name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>+ <fieldtype name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>+++ <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and+ is a more restricted form of the canonical representation of dateTime+ http://www.w3.org/TR/xmlschema-2/#dateTime+ The trailing "Z" designates UTC time and is mandatory.+ Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z+ All other components are mandatory.++ Expressions can also be used to denote calculations that should be+ performed relative to "NOW" to determine the value, ie...++ NOW/HOUR+ ... Round to the start of the current hour+ NOW-1DAY+ ... Exactly 1 day prior to now+ NOW/DAY+6MONTHS+3DAYS+ ... 6 months and 3 days in the future from the start of+ the current day++ Consult the DateField javadocs for more information.+ -->+ <fieldtype name="date" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>++ <!-- solr.TextField allows the specification of custom text analyzers+ specified as a tokenizer and a list of token filters. Different+ analyzers may be specified for indexing and querying.++ The optional positionIncrementGap puts space between multiple fields of+ this type on the same document, with the purpose of preventing false phrase+ matching across fields.++ For more info on customizing your analyzer chain, please see+ http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters+ -->++ <!-- One can also specify an existing Analyzer class that has a+ default constructor via the class attribute on the analyzer element+ <fieldtype name="text_greek" class="solr.TextField">+ <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>+ </fieldType>+ -->++ <!-- A text field that only splits on whitespace for exact matching of words -->+ <fieldtype name="text_ws" class="solr.TextField" positionIncrementGap="100">+ <analyzer>+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>+ </analyzer>+ </fieldtype>++ <!-- A text field that uses WordDelimiterFilter to enable splitting and matching of+ words on case-change, alpha numeric boundaries, and non-alphanumeric chars,+ so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".+ Synonyms and stopwords are customized by external files, and stemming is enabled.+ Duplicate tokens at the same position (which may result from Stemmed Synonyms or+ WordDelim parts) are removed.+ -->+ <fieldtype name="text" class="solr.TextField" positionIncrementGap="100">+ <analyzer type="index">+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>+ <!-- in this example, we will only use synonyms at query time+ <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>+ -->+ <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/>+ <filter class="solr.LowerCaseFilterFactory"/>+ <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>+ <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>+ </analyzer>+ <analyzer type="query">+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>+ <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>+ <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/>+ <filter class="solr.LowerCaseFilterFactory"/>+ <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>+ <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>+ </analyzer>+ </fieldtype>+++ <!-- Less flexible matching, but less false matches. Probably not ideal for product names,+ but may be good for SKUs. Can insert dashes in the wrong place and still match. -->+ <fieldtype name="textTight" class="solr.TextField" positionIncrementGap="100" >+ <analyzer>+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>+ <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>+ <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>+ <filter class="solr.LowerCaseFilterFactory"/>+ <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>+ <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>+ </analyzer>+ </fieldtype>++ </types>+++ <fields>+ <!-- Valid attributes for fields:+ name: mandatory - the name for the field+ type: mandatory - the name of a previously defined type from the <types> section+ indexed: true if this field should be indexed (searchable or sortable)+ stored: true if this field should be retrievable+ compressed: [false] if this field should be stored using gzip compression+ (this will only apply if the field type is compressable; among+ the standard field types, only TextField and StrField are)+ multiValued: true if this field may contain multiple values per document+ omitNorms: (expert) set to true to omit the norms associated with+ this field (this disables length normalization and index-time+ boosting for the field, and saves some memory). Only full-text+ fields or fields that need an index-time boost need norms.+ -->++ <field name="id" type="string" indexed="true" stored="true"/>++ <!-- catchall field, containing all other searchable text fields (implemented+ via copyField further on in this schema -->+ <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>++ <!-- Dynamic field definitions. If a field name is not found, dynamicFields+ will be used if the name matches any of the patterns.+ RESTRICTION: the glob-like pattern in the name attribute must have+ a "*" only at the start or the end.+ EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)+ Longer patterns will be matched first. if equal size patterns+ both match, the first appearing in the schema will be used. -->+ <dynamicField name="*_i" type="sint" indexed="true" stored="true"/>+ <dynamicField name="*_s" type="string" indexed="true" stored="true"/>+ <dynamicField name="*_l" type="slong" indexed="true" stored="true"/>+ <dynamicField name="*_t" type="text" indexed="true" stored="true"/>+ <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>+ <dynamicField name="*_f" type="sfloat" indexed="true" stored="true"/>+ <dynamicField name="*_d" type="sdouble" indexed="true" stored="true"/>+ <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>+ </fields>++ <!-- field to use to determine and enforce document uniqueness. -->+ <uniqueKey>id</uniqueKey>++ <!-- field for the QueryParser to use when an explicit fieldname is absent -->+ <defaultSearchField>text</defaultSearchField>++ <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->+ <solrQueryParser defaultOperator="AND"/>++ <!-- copyField commands copy one field to another at the time a document+ is added to the index. It's used either to index the same field differently,+ or to add multiple fields to the same field for easier/faster searching. -->+<!-- <copyField source="id" dest="sku"/>++ <copyField source="cat" dest="text"/>+ <copyField source="name" dest="text"/>+ <copyField source="manu" dest="text"/>+ <copyField source="features" dest="text"/>+ <copyField source="includes" dest="text"/>++ <copyField source="manu" dest="manu_exact"/>+-->++ <!-- Similarity is the scoring routine for each document vs. a query.+ A custom similarity may be specified here, but the default is fine+ for most applications. -->+ <!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->++</schema>diff --git a/client/ruby/flare/solr/solr/conf/scripts.conf b/client/ruby/flare/solr/solr/conf/scripts.confnew file mode 100644index 00000000000..e993bbfbafd--- /dev/null+++ b/client/ruby/flare/solr/solr/conf/scripts.conf@@ -0,0 +1,24 @@+# 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.++user=+solr_hostname=localhost+solr_port=8983+rsyncd_port=18983+data_dir=+webapp_name=solr+master_host=+master_data_dir=+master_status_dir=diff --git a/client/ruby/flare/solr/solr/conf/solrconfig.xml b/client/ruby/flare/solr/solr/conf/solrconfig.xmlnew file mode 100755index 00000000000..a7c5fd53cbb--- /dev/null+++ b/client/ruby/flare/solr/solr/conf/solrconfig.xml@@ -0,0 +1,277 @@+<?xml version="1.0" ?>+<!--+ 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.+-->++<config>++ <!-- Used to specify an alternate directory to hold all index data+ other than the default ./data under the Solr home.+ If replication is in use, this should match the replication configuration. -->+ <!--+ <dataDir>./solr/data</dataDir>+ -->++ <indexDefaults>+ <!-- Values here affect all index writers and act as a default unless overridden. -->+ <useCompoundFile>false</useCompoundFile>+ <mergeFactor>10</mergeFactor>+ <maxBufferedDocs>1000</maxBufferedDocs>+ <maxMergeDocs>2147483647</maxMergeDocs>+ <maxFieldLength>10000</maxFieldLength>+ <writeLockTimeout>1000</writeLockTimeout>+ <commitLockTimeout>10000</commitLockTimeout>+ </indexDefaults>++ <mainIndex>+ <!-- options specific to the main on-disk lucene index -->+ <useCompoundFile>false</useCompoundFile>+ <mergeFactor>10</mergeFactor>+ <maxBufferedDocs>1000</maxBufferedDocs>+ <maxMergeDocs>2147483647</maxMergeDocs>+ <maxFieldLength>10000</maxFieldLength>++ <!-- If true, unlock any held write or commit locks on startup.+ This defeats the locking mechanism that allows multiple+ processes to safely access a lucene index, and should be+ used with care. -->+ <unlockOnStartup>false</unlockOnStartup>+ </mainIndex>++ <!-- the default high-performance update handler -->+ <updateHandler class="solr.DirectUpdateHandler2">++ <!-- A prefix of "solr." for class names is an alias that+ causes solr to search appropriate packages, including+ org.apache.solr.(search|update|request|core|analysis)+ -->++ <!-- autocommit pending docs if certain criteria are met+ <autoCommit>+ <maxDocs>10000</maxDocs>+ </autoCommit>+ -->++ <!-- The RunExecutableListener executes an external command.+ exe - the name of the executable to run+ dir - dir to use as the current working directory. default="."+ wait - the calling thread waits until the executable returns. default="true"+ args - the arguments to pass to the program. default=nothing+ env - environment variables to set. default=nothing+ -->+ <!-- A postCommit event is fired after every commit or optimize command+ <listener event="postCommit" class="solr.RunExecutableListener">+ <str name="exe">snapshooter</str>+ <str name="dir">solr/bin</str>+ <bool name="wait">true</bool>+ <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>+ <arr name="env"> <str>MYVAR=val1</str> </arr>+ </listener>+ -->+ <!-- A postOptimize event is fired only after every optimize command, useful+ in conjunction with index distribution to only distribute optimized indicies+ <listener event="postOptimize" class="solr.RunExecutableListener">+ <str name="exe">snapshooter</str>+ <str name="dir">solr/bin</str>+ <bool name="wait">true</bool>+ </listener>+ -->++ </updateHandler>+++ <query>+ <!-- Maximum number of clauses in a boolean query... can affect+ range or prefix queries that expand to big boolean+ queries. An exception is thrown if exceeded. -->+ <maxBooleanClauses>1024</maxBooleanClauses>+++ <!-- Cache used by SolrIndexSearcher for filters (DocSets),+ unordered sets of *all* documents that match a query.+ When a new searcher is opened, its caches may be prepopulated+ or "autowarmed" using data from caches in the old searcher.+ autowarmCount is the number of items to prepopulate. For LRUCache,+ the autowarmed items will be the most recently accessed items.+ Parameters:+ class - the SolrCache implementation (currently only LRUCache)+ size - the maximum number of entries in the cache+ initialSize - the initial capacity (number of entries) of+ the cache. (seel java.util.HashMap)+ autowarmCount - the number of entries to prepopulate from+ and old cache.+ -->+ <filterCache+ class="solr.LRUCache"+ size="512"+ initialSize="512"+ autowarmCount="256"/>++ <!-- queryResultCache caches results of searches - ordered lists of+ document ids (DocList) based on a query, a sort, and the range+ of documents requested. -->+ <queryResultCache+ class="solr.LRUCache"+ size="512"+ initialSize="512"+ autowarmCount="256"/>++ <!-- documentCache caches Lucene Document objects (the stored fields for each document).+ Since Lucene internal document ids are transient, this cache will not be autowarmed. -->+ <documentCache+ class="solr.LRUCache"+ size="512"+ initialSize="512"+ autowarmCount="0"/>++ <!-- If true, stored fields that are not requested will be loaded lazily.+ -->+ <enableLazyFieldLoading>false</enableLazyFieldLoading>++ <!-- Example of a generic cache. These caches may be accessed by name+ through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().+ The purpose is to enable easy caching of user/application level data.+ The regenerator argument should be specified as an implementation+ of solr.search.CacheRegenerator if autowarming is desired. -->+ <!--+ <cache name="myUserCache"+ class="solr.LRUCache"+ size="4096"+ initialSize="1024"+ autowarmCount="1024"+ regenerator="org.mycompany.mypackage.MyRegenerator"+ />+ -->++ <!-- An optimization that attempts to use a filter to satisfy a search.+ If the requested sort does not include score, then the filterCache+ will be checked for a filter matching the query. If found, the filter+ will be used as the source of document ids, and then the sort will be+ applied to that.+ <useFilterForSortedQuery>true</useFilterForSortedQuery>+ -->++ <!-- An optimization for use with the queryResultCache. When a search+ is requested, a superset of the requested number of document ids+ are collected. For example, if a search for a particular query+ requests matching documents 10 through 19, and queryWindowSize is 50,+ then documents 0 through 50 will be collected and cached. Any further+ requests in that range can be satisfied via the cache. -->+ <queryResultWindowSize>10</queryResultWindowSize>++ <!-- This entry enables an int hash representation for filters (DocSets)+ when the number of items in the set is less than maxSize. For smaller+ sets, this representation is more memory efficient, more efficient to+ iterate over, and faster to take intersections. -->+ <HashDocSet maxSize="3000" loadFactor="0.75"/>+++ <!-- boolToFilterOptimizer converts boolean clauses with zero boost+ into cached filters if the number of docs selected by the clause exceeds+ the threshold (represented as a fraction of the total index) -->+ <boolTofilterOptimizer enabled="true" cacheSize="32" threshold=".05"/>+++ <!-- a newSearcher event is fired whenever a new searcher is being prepared+ and there is a current searcher handling requests (aka registered). -->+ <!-- QuerySenderListener takes an array of NamedList and executes a+ local query request for each NamedList in sequence. -->+ <!--+ <listener event="newSearcher" class="solr.QuerySenderListener">+ <arr name="queries">+ <lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>+ <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>+ </arr>+ </listener>+ -->++ <!-- a firstSearcher event is fired whenever a new searcher is being+ prepared but there is no current registered searcher to handle+ requests or to gain autowarming data from. -->+ <!--+ <listener event="firstSearcher" class="solr.QuerySenderListener">+ <arr name="queries">+ <lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>+ </arr>+ </listener>+ -->++ <!-- If a search request comes in and there is no current registered searcher,+ then immediately register the still warming searcher and use it. If+ "false" then all requests will block until the first searcher is done+ warming. -->+ <useColdSearcher>false</useColdSearcher>++ </query>+++ <!-- requestHandler plugins... incoming queries will be dispatched to the+ correct handler based on the qt (query type) param matching the+ name of registered handlers.+ The "standard" request handler is the default and will be used if qt+ is not specified in the request.+ -->+ <requestHandler name="standard" class="solr.StandardRequestHandler">+ <!-- default values for query parameters -->+ <lst name="defaults">+ <str name="echoParams">explicit</str>+ <!--+ <int name="rows">10</int>+ <str name="fl">*</str>+ <str name="version">2.1</str>+ -->+ </lst>+ </requestHandler>++ <!-- queryResponseWriter plugins... query responses will be written using the+ writer specified by the 'wt' request parameter matching the name of a registered+ writer.+ The "standard" writer is the default and will be used if 'wt' is not specified+ in the request. XMLResponseWriter will be used if nothing is specified here.+ The json, python, and ruby writers are also available by default.++ <queryResponseWriter name="standard" class="org.apache.solr.request.XMLResponseWriter"/>+ <queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>+ <queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>+ <queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>++ <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>+ -->++ <!-- XSLT response writer transforms the XML output by any xslt file found+ in Solr's conf/xslt directory. Changes to xslt files are checked for+ every xsltCacheLifetimeSeconds.+ -->+ <queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">+ <int name="xsltCacheLifetimeSeconds">5</int>+ </queryResponseWriter>++ <!-- config for the admin interface -->+ <admin>+ <defaultQuery>solr</defaultQuery>+ <gettableFiles>solrconfig.xml schema.xml admin-extra.html</gettableFiles>+ <!-- pingQuery should be "URLish" ...+ & separated key=val pairs ... but there shouldn't be any+ URL escaping of the values -->+ <pingQuery>+ qt=dismax&q=solr&start=3&fq=id:[* TO *]&fq=cat:[* TO *]+ </pingQuery>+ <!-- configure a healthcheck file for servers behind a loadbalancer+ <healthcheck type="file">server-enabled</healthcheck>+ -->+ </admin>++</config>diff --git a/client/ruby/flare/solr/solr/conf/stopwords.txt b/client/ruby/flare/solr/solr/conf/stopwords.txtnew file mode 100644index 00000000000..8433c832d2c--- /dev/null+++ b/client/ruby/flare/solr/solr/conf/stopwords.txt@@ -0,0 +1,57 @@+# 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.++#-----------------------------------------------------------------------+# a couple of test stopwords to test that the words are really being+# configured from this file:+stopworda+stopwordb++#Standard english stop words taken from Lucene's StopAnalyzer+an+and+are+as+at+be+but+by+for+if+in+into+is+it+no+not+of+on+or+s+such+t+that+the+their+then+there+these+they+this+to+was+will+with+diff --git a/client/ruby/flare/solr/solr/conf/synonyms.txt b/client/ruby/flare/solr/solr/conf/synonyms.txtnew file mode 100644index 00000000000..b0e31cb7ec8--- /dev/null+++ b/client/ruby/flare/solr/solr/conf/synonyms.txt@@ -0,0 +1,31 @@+# 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.++#-----------------------------------------------------------------------+#some test synonym mappings unlikely to appear in real input text+aaa => aaaa+bbb => bbbb1 bbbb2+ccc => cccc1,cccc2+a\=>a => b\=>b+a\,a => b\,b+fooaaa,baraaa,bazaaa++# Some synonym groups specific to this example+GB,gib,gigabyte,gigabytes+MB,mib,megabyte,megabytes+Television, Televisions, TV, TVs+#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming+#after us won't split it into two words.++# Synonym mappings can be used for spelling correction too+pixima => pixma+diff --git a/client/ruby/flare/solr/solr/conf/xslt/example.xsl b/client/ruby/flare/solr/solr/conf/xslt/example.xslnew file mode 100644index 00000000000..75178f29d27--- /dev/null+++ b/client/ruby/flare/solr/solr/conf/xslt/example.xsl@@ -0,0 +1,132 @@+<?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+ *+ * 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.+ -->++<!--+ Simple transform of Solr query results to HTML+ -->+<xsl:stylesheet version='1.0'+ xmlns:xsl='http://www.w3.org/1999/XSL/Transform'+>++ <xsl:output media-type="text/html"/>++ <xsl:variable name="title" select="concat('Solr search results (',response/result/@numFound,' documents)')"/>++ <xsl:template match='/'>+ <html>+ <head>+ <title><xsl:value-of select="$title"/></title>+ <xsl:call-template name="css"/>+ </head>+ <body>+ <h1><xsl:value-of select="$title"/></h1>+ <div class="note">+ This has been formatted by the sample "example.xsl" transform -+ use your own XSLT to get a nicer page+ </div>+ <xsl:apply-templates select="response/result/doc"/>+ </body>+ </html>+ </xsl:template>++ <xsl:template match="doc">+ <xsl:variable name="pos" select="position()"/>+ <div class="doc">+ <table width="100%">+ <xsl:apply-templates>+ <xsl:with-param name="pos"><xsl:value-of select="$pos"/></xsl:with-param>+ </xsl:apply-templates>+ </table>+ </div>+ </xsl:template>++ <xsl:template match="doc/*[@name='score']" priority="100">+ <xsl:param name="pos"></xsl:param>+ <tr>+ <td class="name">+ <xsl:value-of select="@name"/>+ </td>+ <td class="value">+ <xsl:value-of select="."/>++ <xsl:if test="boolean(//lst[@name='explain'])">+ <xsl:element name="a">+ <!-- can't allow whitespace here -->+ <xsl:attribute name="href">javascript:toggle("<xsl:value-of select="concat('exp-',$pos)" />");</xsl:attribute>?</xsl:element>+ <br/>+ <xsl:element name="div">+ <xsl:attribute name="class">exp</xsl:attribute>+ <xsl:attribute name="id">+ <xsl:value-of select="concat('exp-',$pos)" />+ </xsl:attribute>+ <xsl:value-of select="//lst[@name='explain']/str[position()=$pos]"/>+ </xsl:element>+ </xsl:if>+ </td>+ </tr>+ </xsl:template>++ <xsl:template match="doc/arr" priority="100">+ <tr>+ <td class="name">+ <xsl:value-of select="@name"/>+ </td>+ <td class="value">+ <ul>+ <xsl:for-each select="*">+ <li><xsl:value-of select="."/></li>+ </xsl:for-each>+ </ul>+ </td>+ </tr>+ </xsl:template>+++ <xsl:template match="doc/*">+ <tr>+ <td class="name">+ <xsl:value-of select="@name"/>+ </td>+ <td class="value">+ <xsl:value-of select="."/>+ </td>+ </tr>+ </xsl:template>++ <xsl:template match="*"/>++ <xsl:template name="css">+ <script>+ function toggle(id) {+ var obj = document.getElementById(id);+ obj.style.display = (obj.style.display != 'block') ? 'block' : 'none';+ }+ </script>+ <style type="text/css">+ body { font-family: "Lucida Grande", sans-serif }+ td.name { font-style: italic; font-size:80%; }+ td { vertical-align: top; }+ ul { margin: 0px; margin-left: 1em; padding: 0px; }+ .note { font-size:80%; }+ .doc { margin-top: 1em; border-top: solid grey 1px; }+ .exp { display: none; font-family: monospace; white-space: pre; }+ </style>+ </xsl:template>++</xsl:stylesheet>diff --git a/client/ruby/flare/solr/solr/data/index/_0.f0 b/client/ruby/flare/solr/solr/data/index/_0.f0new file mode 100644index 00000000000..c1b0730e013--- /dev/null+++ b/client/ruby/flare/solr/solr/data/index/_0.f0@@ -0,0 +1 @@+x\ No newline at end of filediff --git a/client/ruby/flare/solr/solr/data/index/_0.fdt b/client/ruby/flare/solr/solr/data/index/_0.fdtnew file mode 100644index 00000000000..126b5ce9a5aBinary files /dev/null and b/client/ruby/flare/solr/solr/data/index/_0.fdt differdiff --git a/client/ruby/flare/solr/solr/data/index/_0.fdx b/client/ruby/flare/solr/solr/data/index/_0.fdxnew file mode 100644index 00000000000..1b1cb4d44c5Binary files /dev/null and b/client/ruby/flare/solr/solr/data/index/_0.fdx differdiff --git a/client/ruby/flare/solr/solr/data/index/_0.fnm b/client/ruby/flare/solr/solr/data/index/_0.fnmnew file mode 100644index 00000000000..98d78e8ee43--- /dev/null+++ b/client/ruby/flare/solr/solr/data/index/_0.fnm@@ -0,0 +1 @@+textid\ No newline at end of filediff --git a/client/ruby/flare/solr/solr/data/index/_0.frq b/client/ruby/flare/solr/solr/data/index/_0.frqnew file mode 100644index 00000000000..9cb1bca7875--- /dev/null+++ b/client/ruby/flare/solr/solr/data/index/_0.frq@@ -0,0 +1 @@+\ No newline at end of filediff --git a/client/ruby/flare/solr/solr/data/index/_0.prx b/client/ruby/flare/solr/solr/data/index/_0.prxnew file mode 100644index 00000000000..4f81a0dfb43Binary files /dev/null and b/client/ruby/flare/solr/solr/data/index/_0.prx differdiff --git a/client/ruby/flare/solr/solr/data/index/_0.tii b/client/ruby/flare/solr/solr/data/index/_0.tiinew file mode 100644index 00000000000..9867f51ce54Binary files /dev/null and b/client/ruby/flare/solr/solr/data/index/_0.tii differdiff --git a/client/ruby/flare/solr/solr/data/index/_0.tis b/client/ruby/flare/solr/solr/data/index/_0.tisnew file mode 100644index 00000000000..ee7b326266eBinary files /dev/null and b/client/ruby/flare/solr/solr/data/index/_0.tis differdiff --git a/client/ruby/flare/solr/solr/data/index/deletable b/client/ruby/flare/solr/solr/data/index/deletablenew file mode 100644index 00000000000..593f4708db8Binary files /dev/null and b/client/ruby/flare/solr/solr/data/index/deletable differdiff --git a/client/ruby/flare/solr/solr/data/index/segments b/client/ruby/flare/solr/solr/data/index/segmentsnew file mode 100644index 00000000000..6118b8d678aBinary files /dev/null and b/client/ruby/flare/solr/solr/data/index/segments differdiff --git a/client/ruby/flare/solr/webapps/solr.war b/client/ruby/flare/solr/webapps/solr.warnew file mode 100644index 00000000000..6989fce03a8Binary files /dev/null and b/client/ruby/flare/solr/webapps/solr.war differ