From solr-commitshinesstephen@example.com Thu Feb 02 16:34:10 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 43658 invoked from network); 2 Feb 2006 16:34:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2006 16:34:08 -0000 Received: (qmail 74771 invoked by uid 500); 2 Feb 2006 16:34:03 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 74720 invoked by uid 500); 2 Feb 2006 16:34:03 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 74697 invoked by uid 99); 2 Feb 2006 16:34:03 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2006 08:34:01 -0800 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 5C41ECB for <hinesstephen@example.com>; Thu, 2 Feb 2006 17:29:23 +0100 (CET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki <hinesstephen@example.com> To: hinesstephen@example.com Date: Thu, 02 Feb 2006 16:29:23 -0000 Message-ID: <hinesstephen@example.com> Subject: [Solr Wiki] Update of "PublicServers" by YonikSeeley X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification. The following page has been changed by YonikSeeley: http://wiki.apache.org/solr/PublicServers ------------------------------------------------------------------------------ = Public Websites using Solr = * [http://reviews.cnet.com/ CNET Reviews] uses Solr for faceted browsing + * [http://www.cnetchannel.com/main/default.aspx CNET Channel] uses Solr (paid subscription required) + * [http://www.search.com/ search.com] queries some Solr search collections From solr-commitshinesstephen@example.com Thu Feb 02 21:37:43 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 25196 invoked from network); 2 Feb 2006 21:37:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2006 21:37:42 -0000 Received: (qmail 74599 invoked by uid 500); 2 Feb 2006 21:37:41 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 74526 invoked by uid 500); 2 Feb 2006 21:37:41 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 74477 invoked by uid 99); 2 Feb 2006 21:37:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2006 13:37:41 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 02 Feb 2006 13:37:40 -0800 Received: (qmail 25100 invoked by uid 65534); 2 Feb 2006 21:37:19 -0000 Message-ID: <hinesstephen@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r374513 - in /incubator/solr/trunk/src: java/org/apache/solr/analysis/ lucene_extras/org/apache/lucene/analysis/ test/org/apache/solr/analysis/ Date: Thu, 02 Feb 2006 21:37:18 -0000 To: hinesstephen@example.com From: hinesstephen@example.com X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: yonik Date: Thu Feb 2 13:37:12 2006 New Revision: 374513 URL: http://svn.apache.org/viewcvs?rev=374513&view=rev Log: move SynonymFilter and SynonymMap to solr package Added: incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymFilter.java (contents, props changed) - copied, changed from r373882, incubator/solr/trunk/src/lucene_extras/org/apache/lucene/analysis/SynonymFilter.java incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymMap.java (contents, props changed) - copied, changed from r373882, incubator/solr/trunk/src/lucene_extras/org/apache/lucene/analysis/SynonymMap.java Removed: incubator/solr/trunk/src/lucene_extras/org/apache/lucene/analysis/ Modified: incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymFilterFactory.java incubator/solr/trunk/src/test/org/apache/solr/analysis/TestSynonymFilter.java Copied: incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymFilter.java (from r373882, incubator/solr/trunk/src/lucene_extras/org/apache/lucene/analysis/SynonymFilter.java) URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymFilter.java?p2=incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymFilter.java&p1=incubator/solr/trunk/src/lucene_extras/org/apache/lucene/analysis/SynonymFilter.java&r1=373882&r2=374513&rev=374513&view=diff ============================================================================== --- incubator/solr/trunk/src/lucene_extras/org/apache/lucene/analysis/SynonymFilter.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymFilter.java Thu Feb 2 13:37:12 2006 @@ -14,10 +14,16 @@ * limitations under the License. */ -package org.apache.lucene.analysis; +package org.apache.solr.analysis; + +import org.apache.lucene.analysis.Token; +import org.apache.lucene.analysis.TokenFilter; +import org.apache.lucene.analysis.TokenStream; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedList; /** SynonymFilter handles multi-token synonyms with variable position increment offsets. * <p> @@ -73,7 +79,7 @@ // common case fast-path of first token not matching anything Token firstTok = nextTok(); if (firstTok ==null) return null; - String str = ignoreCase ? firstTok.termText.toLowerCase() : firstTok.termText; + String str = ignoreCase ? firstTok.termText().toLowerCase() : firstTok.termText(); Object o = map.submap!=null ? map.submap.get(str) : null; if (o == null) return firstTok; @@ -106,7 +112,7 @@ for (int i=0; i<result.synonyms.length; i++) { Token repTok = result.synonyms[i]; - Token newTok = new Token(repTok.termText, firstTok.startOffset, lastTok.endOffset, firstTok.type); + Token newTok = new Token(repTok.termText(), firstTok.startOffset(), lastTok.endOffset(), firstTok.type()); repPos += repTok.getPositionIncrement(); if (i==0) repPos=origPos; // make position of first token equal to original @@ -176,7 +182,7 @@ Token tok = nextTok(); if (tok != null) { // check for positionIncrement!=1? if>1, should not match, if==0, check multiple at this level? - String str = ignoreCase ? tok.termText.toLowerCase() : tok.termText; + String str = ignoreCase ? tok.termText().toLowerCase() : tok.termText(); SynonymMap subMap = (SynonymMap)map.submap.get(str); Propchange: incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymFilter.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymFilterFactory.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymFilterFactory.java?rev=374513&r1=374512&r2=374513&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymFilterFactory.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymFilterFactory.java Thu Feb 2 13:37:12 2006 @@ -17,18 +17,14 @@ package org.apache.solr.analysis; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.SynonymFilter; -import org.apache.lucene.analysis.SynonymMap; +import org.apache.solr.core.Config; +import org.apache.solr.core.SolrCore; +import org.apache.solr.util.StrUtils; -import java.util.Map; +import java.io.IOException; import java.util.ArrayList; import java.util.List; -import java.io.IOException; - -import org.apache.solr.util.StrUtils; -import org.apache.solr.analysis.BaseTokenFilterFactory; -import org.apache.solr.core.Config; -import org.apache.solr.core.SolrCore; +import java.util.Map; /** * @author yonik * @version $Id$ Copied: incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymMap.java (from r373882, incubator/solr/trunk/src/lucene_extras/org/apache/lucene/analysis/SynonymMap.java) URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymMap.java?p2=incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymMap.java&p1=incubator/solr/trunk/src/lucene_extras/org/apache/lucene/analysis/SynonymMap.java&r1=373882&r2=374513&rev=374513&view=diff ============================================================================== --- incubator/solr/trunk/src/lucene_extras/org/apache/lucene/analysis/SynonymMap.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymMap.java Thu Feb 2 13:37:12 2006 @@ -14,11 +14,13 @@ * limitations under the License. */ -package org.apache.lucene.analysis; +package org.apache.solr.analysis; + +import org.apache.lucene.analysis.Token; import java.util.*; -/** Mapping rules for use with {@link SynonymFilter} +/** Mapping rules for use with {@link org.apache.solr.analysis.SynonymFilter} * * @author yonik * @version $Id: SynonymMap.java,v 1.2 2005/12/13 05:15:08 yonik Exp $ @@ -121,7 +123,7 @@ int pos2 = tok2!=null ? tok2.getPositionIncrement() : 0; while(tok1!=null || tok2!=null) { while (tok1 != null && (pos1 <= pos2 || tok2==null)) { - Token tok = new Token(tok1.termText, tok1.startOffset, tok1.endOffset, tok1.type); + Token tok = new Token(tok1.termText(), tok1.startOffset(), tok1.endOffset(), tok1.type()); tok.setPositionIncrement(pos1-pos); result.add(tok); pos=pos1; @@ -129,7 +131,7 @@ pos1 += tok1!=null ? tok1.getPositionIncrement() : 0; } while (tok2 != null && (pos2 <= pos1 || tok1==null)) { - Token tok = new Token(tok2.termText, tok2.startOffset, tok2.endOffset, tok2.type); + Token tok = new Token(tok2.termText(), tok2.startOffset(), tok2.endOffset(), tok2.type()); tok.setPositionIncrement(pos2-pos); result.add(tok); pos=pos2; Propchange: incubator/solr/trunk/src/java/org/apache/solr/analysis/SynonymMap.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/solr/trunk/src/test/org/apache/solr/analysis/TestSynonymFilter.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/test/org/apache/solr/analysis/TestSynonymFilter.java?rev=374513&r1=374512&r2=374513&view=diff ============================================================================== --- incubator/solr/trunk/src/test/org/apache/solr/analysis/TestSynonymFilter.java (original) +++ incubator/solr/trunk/src/test/org/apache/solr/analysis/TestSynonymFilter.java Thu Feb 2 13:37:12 2006 @@ -17,6 +17,8 @@ package org.apache.solr.analysis; import junit.framework.TestCase; +import org.apache.lucene.analysis.Token; +import org.apache.lucene.analysis.TokenStream; import java.io.IOException; import java.util.ArrayList; From solr-commitshinesstephen@example.com Thu Feb 02 22:07:05 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 38463 invoked from network); 2 Feb 2006 22:07:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2006 22:07:05 -0000 Received: (qmail 27640 invoked by uid 500); 2 Feb 2006 22:07:05 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 27622 invoked by uid 500); 2 Feb 2006 22:07:04 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 27610 invoked by uid 99); 2 Feb 2006 22:07:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2006 14:07:04 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 02 Feb 2006 14:07:03 -0800 Received: (qmail 38388 invoked by uid 65534); 2 Feb 2006 22:06:42 -0000 Message-ID: <hinesstephen@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r374526 - in /incubator/solr/trunk/src: java/org/apache/solr/schema/ java/org/apache/solr/search/ java/org/apache/solr/search/function/ lucene_extras/org/apache/lucene/search/ lucene_extras/org/apache/lucene/search/function/ Date: Thu, 02 Feb 2006 22:06:38 -0000 To: hinesstephen@example.com From: hinesstephen@example.com X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: yonik Date: Thu Feb 2 14:06:28 2006 New Revision: 374526 URL: http://svn.apache.org/viewcvs?rev=374526&view=rev Log: move FunctionQuery and ConstantScorePrefixQuery to solr package Added: incubator/solr/trunk/src/java/org/apache/solr/search/ConstantScorePrefixQuery.java (contents, props changed) - copied, changed from r373882, incubator/solr/trunk/src/lucene_extras/org/apache/lucene/search/ConstantScorePrefixQuery.java incubator/solr/trunk/src/java/org/apache/solr/search/PrefixFilter.java incubator/solr/trunk/src/java/org/apache/solr/search/function/ - copied from r373882, incubator/solr/trunk/src/lucene_extras/org/apache/lucene/search/function/ Removed: incubator/solr/trunk/src/java/org/apache/solr/search/function/function.zip incubator/solr/trunk/src/lucene_extras/org/apache/lucene/search/ConstantScorePrefixQuery.java incubator/solr/trunk/src/lucene_extras/org/apache/lucene/search/PrefixFilter.java incubator/solr/trunk/src/lucene_extras/org/apache/lucene/search/function/ Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/BCDIntField.java incubator/solr/trunk/src/java/org/apache/solr/schema/BoolField.java incubator/solr/trunk/src/java/org/apache/solr/schema/DateField.java incubator/solr/trunk/src/java/org/apache/solr/schema/DoubleField.java incubator/solr/trunk/src/java/org/apache/solr/schema/FieldType.java incubator/solr/trunk/src/java/org/apache/solr/schema/FloatField.java incubator/solr/trunk/src/java/org/apache/solr/schema/IntField.java incubator/solr/trunk/src/java/org/apache/solr/schema/LongField.java incubator/solr/trunk/src/java/org/apache/solr/schema/SortableDoubleField.java incubator/solr/trunk/src/java/org/apache/solr/schema/SortableFloatField.java incubator/solr/trunk/src/java/org/apache/solr/schema/SortableIntField.java incubator/solr/trunk/src/java/org/apache/solr/schema/SortableLongField.java incubator/solr/trunk/src/java/org/apache/solr/search/QueryParsing.java incubator/solr/trunk/src/java/org/apache/solr/search/function/DocValues.java incubator/solr/trunk/src/java/org/apache/solr/search/function/FieldCacheSource.java incubator/solr/trunk/src/java/org/apache/solr/search/function/FloatFieldSource.java incubator/solr/trunk/src/java/org/apache/solr/search/function/FunctionQuery.java incubator/solr/trunk/src/java/org/apache/solr/search/function/IntFieldSource.java incubator/solr/trunk/src/java/org/apache/solr/search/function/LinearFloatFunction.java incubator/solr/trunk/src/java/org/apache/solr/search/function/OrdFieldSource.java incubator/solr/trunk/src/java/org/apache/solr/search/function/ReciprocalFloatFunction.java incubator/solr/trunk/src/java/org/apache/solr/search/function/ReverseOrdFieldSource.java incubator/solr/trunk/src/java/org/apache/solr/search/function/ValueSource.java Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/BCDIntField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/BCDIntField.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/BCDIntField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/BCDIntField.java Thu Feb 2 14:06:28 2006 @@ -17,7 +17,7 @@ package org.apache.solr.schema; import org.apache.lucene.search.SortField; -import org.apache.lucene.search.function.ValueSource; +import org.apache.solr.search.function.ValueSource; import org.apache.lucene.document.Field; import org.apache.solr.util.BCDUtils; import org.apache.solr.request.XMLWriter; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/BoolField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/BoolField.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/BoolField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/BoolField.java Thu Feb 2 14:06:28 2006 @@ -17,8 +17,8 @@ package org.apache.solr.schema; import org.apache.lucene.search.SortField; -import org.apache.lucene.search.function.ValueSource; -import org.apache.lucene.search.function.OrdFieldSource; +import org.apache.solr.search.function.ValueSource; +import org.apache.solr.search.function.OrdFieldSource; import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/DateField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/DateField.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/DateField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/DateField.java Thu Feb 2 14:06:28 2006 @@ -20,8 +20,8 @@ import org.apache.solr.request.XMLWriter; import org.apache.lucene.document.Field; import org.apache.lucene.search.SortField; -import org.apache.lucene.search.function.ValueSource; -import org.apache.lucene.search.function.OrdFieldSource; +import org.apache.solr.search.function.ValueSource; +import org.apache.solr.search.function.OrdFieldSource; import java.util.Map; import java.io.IOException; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/DoubleField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/DoubleField.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/DoubleField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/DoubleField.java Thu Feb 2 14:06:28 2006 @@ -17,8 +17,8 @@ package org.apache.solr.schema; import org.apache.lucene.search.SortField; -import org.apache.lucene.search.function.ValueSource; -import org.apache.lucene.search.function.FloatFieldSource; +import org.apache.solr.search.function.ValueSource; +import org.apache.solr.search.function.FloatFieldSource; import org.apache.lucene.document.Field; import org.apache.solr.request.XMLWriter; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/FieldType.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/FieldType.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/FieldType.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/FieldType.java Thu Feb 2 14:06:28 2006 @@ -22,8 +22,8 @@ import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.Token; import org.apache.lucene.search.SortField; -import org.apache.lucene.search.function.ValueSource; -import org.apache.lucene.search.function.OrdFieldSource; +import org.apache.solr.search.function.ValueSource; +import org.apache.solr.search.function.OrdFieldSource; import org.apache.solr.search.Sorting; import org.apache.solr.request.XMLWriter; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/FloatField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/FloatField.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/FloatField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/FloatField.java Thu Feb 2 14:06:28 2006 @@ -17,8 +17,8 @@ package org.apache.solr.schema; import org.apache.lucene.search.SortField; -import org.apache.lucene.search.function.ValueSource; -import org.apache.lucene.search.function.FloatFieldSource; +import org.apache.solr.search.function.ValueSource; +import org.apache.solr.search.function.FloatFieldSource; import org.apache.lucene.document.Field; import org.apache.solr.request.XMLWriter; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/IntField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/IntField.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/IntField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/IntField.java Thu Feb 2 14:06:28 2006 @@ -17,8 +17,8 @@ package org.apache.solr.schema; import org.apache.lucene.search.SortField; -import org.apache.lucene.search.function.ValueSource; -import org.apache.lucene.search.function.IntFieldSource; +import org.apache.solr.search.function.ValueSource; +import org.apache.solr.search.function.IntFieldSource; import org.apache.lucene.document.Field; import org.apache.solr.request.XMLWriter; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/LongField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/LongField.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/LongField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/LongField.java Thu Feb 2 14:06:28 2006 @@ -17,8 +17,8 @@ package org.apache.solr.schema; import org.apache.lucene.search.SortField; -import org.apache.lucene.search.function.ValueSource; -import org.apache.lucene.search.function.IntFieldSource; +import org.apache.solr.search.function.ValueSource; +import org.apache.solr.search.function.IntFieldSource; import org.apache.lucene.document.Field; import org.apache.solr.request.XMLWriter; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/SortableDoubleField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/SortableDoubleField.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/SortableDoubleField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/SortableDoubleField.java Thu Feb 2 14:06:28 2006 @@ -18,9 +18,9 @@ import org.apache.lucene.search.SortField; import org.apache.lucene.search.FieldCache; -import org.apache.lucene.search.function.ValueSource; -import org.apache.lucene.search.function.FieldCacheSource; -import org.apache.lucene.search.function.DocValues; +import org.apache.solr.search.function.ValueSource; +import org.apache.solr.search.function.FieldCacheSource; +import org.apache.solr.search.function.DocValues; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; import org.apache.solr.util.NumberUtils; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/SortableFloatField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/SortableFloatField.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/SortableFloatField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/SortableFloatField.java Thu Feb 2 14:06:28 2006 @@ -18,9 +18,9 @@ import org.apache.lucene.search.SortField; import org.apache.lucene.search.FieldCache; -import org.apache.lucene.search.function.ValueSource; -import org.apache.lucene.search.function.FieldCacheSource; -import org.apache.lucene.search.function.DocValues; +import org.apache.solr.search.function.ValueSource; +import org.apache.solr.search.function.FieldCacheSource; +import org.apache.solr.search.function.DocValues; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; import org.apache.solr.util.NumberUtils; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/SortableIntField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/SortableIntField.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/SortableIntField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/SortableIntField.java Thu Feb 2 14:06:28 2006 @@ -18,9 +18,9 @@ import org.apache.lucene.search.SortField; import org.apache.lucene.search.FieldCache; -import org.apache.lucene.search.function.ValueSource; -import org.apache.lucene.search.function.FieldCacheSource; -import org.apache.lucene.search.function.DocValues; +import org.apache.solr.search.function.ValueSource; +import org.apache.solr.search.function.FieldCacheSource; +import org.apache.solr.search.function.DocValues; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; import org.apache.solr.util.NumberUtils; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/SortableLongField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/SortableLongField.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/SortableLongField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/SortableLongField.java Thu Feb 2 14:06:28 2006 @@ -18,9 +18,9 @@ import org.apache.lucene.search.SortField; import org.apache.lucene.search.FieldCache; -import org.apache.lucene.search.function.ValueSource; -import org.apache.lucene.search.function.FieldCacheSource; -import org.apache.lucene.search.function.DocValues; +import org.apache.solr.search.function.ValueSource; +import org.apache.solr.search.function.FieldCacheSource; +import org.apache.solr.search.function.DocValues; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; import org.apache.solr.util.NumberUtils; Copied: incubator/solr/trunk/src/java/org/apache/solr/search/ConstantScorePrefixQuery.java (from r373882, incubator/solr/trunk/src/lucene_extras/org/apache/lucene/search/ConstantScorePrefixQuery.java) URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/ConstantScorePrefixQuery.java?p2=incubator/solr/trunk/src/java/org/apache/solr/search/ConstantScorePrefixQuery.java&p1=incubator/solr/trunk/src/lucene_extras/org/apache/lucene/search/ConstantScorePrefixQuery.java&r1=373882&r2=374526&rev=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/lucene_extras/org/apache/lucene/search/ConstantScorePrefixQuery.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/ConstantScorePrefixQuery.java Thu Feb 2 14:06:28 2006 @@ -14,10 +14,12 @@ * limitations under the License. */ -package org.apache.lucene.search; +package org.apache.solr.search; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; +import org.apache.lucene.search.Query; +import org.apache.lucene.search.ConstantScoreQuery; import java.io.IOException; Propchange: incubator/solr/trunk/src/java/org/apache/solr/search/ConstantScorePrefixQuery.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/solr/trunk/src/java/org/apache/solr/search/PrefixFilter.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/PrefixFilter.java?rev=374526&view=auto ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/PrefixFilter.java (added) +++ incubator/solr/trunk/src/java/org/apache/solr/search/PrefixFilter.java Thu Feb 2 14:06:28 2006 @@ -0,0 +1,79 @@ +package org.apache.solr.search; + +import org.apache.lucene.search.Filter; +import org.apache.lucene.index.Term; +import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.TermEnum; +import org.apache.lucene.index.TermDocs; + +import java.util.BitSet; +import java.io.IOException; + +/** + * @author yonik + * @version $Id: PrefixFilter.java,v 1.1 2005/06/10 05:47:32 yonik Exp $ + */ +public class PrefixFilter extends Filter { + protected final Term prefix; + + PrefixFilter(Term prefix) { + this.prefix = prefix; + } + + Term getPrefix() { return prefix; } + + public BitSet bits(IndexReader reader) throws IOException { + final BitSet bitSet = new BitSet(reader.maxDoc()); + new PrefixGenerator(prefix) { + public void handleDoc(int doc) { + bitSet.set(doc); + } + }.generate(reader); + return bitSet; + } +} + +// keep this protected until I decide if it's a good way +// to separate id generation from collection (or should +// I just reuse hitcollector???) +interface IdGenerator { + public void generate(IndexReader reader) throws IOException; + public void handleDoc(int doc); +} + + +abstract class PrefixGenerator implements IdGenerator { + protected final Term prefix; + + PrefixGenerator(Term prefix) { + this.prefix = prefix; + } + + public void generate(IndexReader reader) throws IOException { + TermEnum enumerator = reader.terms(prefix); + TermDocs termDocs = reader.termDocs(); + + try { + + String prefixText = prefix.text(); + String prefixField = prefix.field(); + do { + Term term = enumerator.term(); + if (term != null && + term.text().startsWith(prefixText) && + term.field() == prefixField) + { + termDocs.seek(term); + while (termDocs.next()) { + handleDoc(termDocs.doc()); + } + } else { + break; + } + } while (enumerator.next()); + } finally { + termDocs.close(); + enumerator.close(); + } + } +} Modified: incubator/solr/trunk/src/java/org/apache/solr/search/QueryParsing.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/QueryParsing.java?rev=374526&r1=374525&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/QueryParsing.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/QueryParsing.java Thu Feb 2 14:06:28 2006 @@ -17,7 +17,7 @@ package org.apache.solr.search; import org.apache.lucene.search.*; -import org.apache.lucene.search.function.*; +import org.apache.solr.search.function.*; import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.document.Field; import org.apache.lucene.index.Term; Modified: incubator/solr/trunk/src/java/org/apache/solr/search/function/DocValues.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/function/DocValues.java?rev=374526&r1=373882&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/function/DocValues.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/function/DocValues.java Thu Feb 2 14:06:28 2006 @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.apache.lucene.search.function; +package org.apache.solr.search.function; import org.apache.lucene.search.Explanation; Modified: incubator/solr/trunk/src/java/org/apache/solr/search/function/FieldCacheSource.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/function/FieldCacheSource.java?rev=374526&r1=373882&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/function/FieldCacheSource.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/function/FieldCacheSource.java Thu Feb 2 14:06:28 2006 @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.apache.lucene.search.function; +package org.apache.solr.search.function; import org.apache.lucene.search.FieldCache; Modified: incubator/solr/trunk/src/java/org/apache/solr/search/function/FloatFieldSource.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/function/FloatFieldSource.java?rev=374526&r1=373882&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/function/FloatFieldSource.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/function/FloatFieldSource.java Thu Feb 2 14:06:28 2006 @@ -14,11 +14,10 @@ * limitations under the License. */ -package org.apache.lucene.search.function; +package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.search.function.DocValues; -import org.apache.lucene.search.function.ValueSource; +import org.apache.solr.search.function.DocValues; import org.apache.lucene.search.FieldCache; import java.io.IOException; Modified: incubator/solr/trunk/src/java/org/apache/solr/search/function/FunctionQuery.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/function/FunctionQuery.java?rev=374526&r1=373882&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/function/FunctionQuery.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/function/FunctionQuery.java Thu Feb 2 14:06:28 2006 @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.apache.lucene.search.function; +package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.*; Modified: incubator/solr/trunk/src/java/org/apache/solr/search/function/IntFieldSource.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/function/IntFieldSource.java?rev=374526&r1=373882&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/function/IntFieldSource.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/function/IntFieldSource.java Thu Feb 2 14:06:28 2006 @@ -14,11 +14,10 @@ * limitations under the License. */ -package org.apache.lucene.search.function; +package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.search.function.DocValues; -import org.apache.lucene.search.function.ValueSource; +import org.apache.solr.search.function.DocValues; import org.apache.lucene.search.FieldCache; import java.io.IOException; Modified: incubator/solr/trunk/src/java/org/apache/solr/search/function/LinearFloatFunction.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/function/LinearFloatFunction.java?rev=374526&r1=373882&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/function/LinearFloatFunction.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/function/LinearFloatFunction.java Thu Feb 2 14:06:28 2006 @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.apache.lucene.search.function; +package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; Modified: incubator/solr/trunk/src/java/org/apache/solr/search/function/OrdFieldSource.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/function/OrdFieldSource.java?rev=374526&r1=373882&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/function/OrdFieldSource.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/function/OrdFieldSource.java Thu Feb 2 14:06:28 2006 @@ -14,11 +14,11 @@ * limitations under the License. */ -package org.apache.lucene.search.function; +package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.search.function.DocValues; -import org.apache.lucene.search.function.ValueSource; +import org.apache.solr.search.function.DocValues; +import org.apache.solr.search.function.ValueSource; import org.apache.lucene.search.FieldCache; import java.io.IOException; Modified: incubator/solr/trunk/src/java/org/apache/solr/search/function/ReciprocalFloatFunction.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/function/ReciprocalFloatFunction.java?rev=374526&r1=373882&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/function/ReciprocalFloatFunction.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/function/ReciprocalFloatFunction.java Thu Feb 2 14:06:28 2006 @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.apache.lucene.search.function; +package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; @@ -22,7 +22,7 @@ /** * <code>ReciprocalFloatFunction</code> implements a reciprocal function f(x) = a/(mx+b), based on - * the float value of a field as exported by {@link org.apache.lucene.search.function.ValueSource}. + * the float value of a field as exported by {@link org.apache.solr.search.function.ValueSource}. * <br> * * When a and b are equal, and x>=0, this function has a maximum value of 1 that drops as x increases. Modified: incubator/solr/trunk/src/java/org/apache/solr/search/function/ReverseOrdFieldSource.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/function/ReverseOrdFieldSource.java?rev=374526&r1=373882&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/function/ReverseOrdFieldSource.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/function/ReverseOrdFieldSource.java Thu Feb 2 14:06:28 2006 @@ -14,11 +14,11 @@ * limitations under the License. */ -package org.apache.lucene.search.function; +package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.search.function.DocValues; -import org.apache.lucene.search.function.ValueSource; +import org.apache.solr.search.function.DocValues; +import org.apache.solr.search.function.ValueSource; import org.apache.lucene.search.FieldCache; import java.io.IOException; Modified: incubator/solr/trunk/src/java/org/apache/solr/search/function/ValueSource.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/function/ValueSource.java?rev=374526&r1=373882&r2=374526&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/function/ValueSource.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/function/ValueSource.java Thu Feb 2 14:06:28 2006 @@ -14,16 +14,16 @@ * limitations under the License. */ -package org.apache.lucene.search.function; +package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.search.function.DocValues; +import org.apache.solr.search.function.DocValues; import java.io.IOException; import java.io.Serializable; /** - * Instantiates {@link org.apache.lucene.search.function.DocValues} for a particular reader. + * Instantiates {@link org.apache.solr.search.function.DocValues} for a particular reader. * <br> * Often used when creating a {@link FunctionQuery}. * From solr-commitshinesstephen@example.com Thu Feb 02 23:02:16 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 61849 invoked from network); 2 Feb 2006 23:02:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2006 23:02:16 -0000 Received: (qmail 10901 invoked by uid 500); 2 Feb 2006 23:02:15 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 10876 invoked by uid 500); 2 Feb 2006 23:02:15 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 10867 invoked by uid 99); 2 Feb 2006 23:02:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2006 15:02:15 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 02 Feb 2006 15:02:14 -0800 Received: (qmail 61793 invoked by uid 65534); 2 Feb 2006 23:01:53 -0000 Message-ID: <hinesstephen@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r374539 - in /incubator/solr/trunk/src: apps/SolarTest/ java/org/apache/solr/analysis/ java/org/apache/solr/schema/ Date: Thu, 02 Feb 2006 23:01:52 -0000 To: hinesstephen@example.com From: hinesstephen@example.com X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: yonik Date: Thu Feb 2 15:01:47 2006 New Revision: 374539 URL: http://svn.apache.org/viewcvs?rev=374539&view=rev Log: positionIncrementGap schema support Added: incubator/solr/trunk/src/java/org/apache/solr/analysis/SolrAnalyzer.java Modified: incubator/solr/trunk/src/apps/SolarTest/newtest.txt incubator/solr/trunk/src/apps/SolarTest/schema.xml incubator/solr/trunk/src/java/org/apache/solr/analysis/TokenizerChain.java incubator/solr/trunk/src/java/org/apache/solr/schema/BoolField.java incubator/solr/trunk/src/java/org/apache/solr/schema/FieldType.java incubator/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java Modified: incubator/solr/trunk/src/apps/SolarTest/newtest.txt URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/apps/SolarTest/newtest.txt?rev=374539&r1=374538&r2=374539&view=diff ============================================================================== --- incubator/solr/trunk/src/apps/SolarTest/newtest.txt (original) +++ incubator/solr/trunk/src/apps/SolarTest/newtest.txt Thu Feb 2 15:01:47 2006 @@ -535,6 +535,22 @@ id:13 AND syn:bar %//*[@numFound="1"] id:13 AND syn:baz %//*[@numFound="1"] + +#test position increment gaps between field values +<delete><id>44</id></delete> +<delete><id>45</id></delete> +<add><doc><field name="id">44</field><field name="textgap">aa bb cc</field><field name="textgap">dd ee ff</field></doc></add> +<add><doc><field name="id">45</field><field name="text">aa bb cc</field><field name="text">dd ee ff</field></doc></add> +<commit/> ++id:44 +textgap:"aa bb cc" %//*[@numFound="1"] ++id:44 +textgap:"dd ee ff" %//*[@numFound="1"] ++id:44 +textgap:"cc dd" %//*[@numFound="0"] ++id:44 +textgap:"cc dd"~100 %//*[@numFound="1"] ++id:44 +textgap:"bb cc dd ee"~90 %//*[@numFound="0"] ++id:44 +textgap:"bb cc dd ee"~100 %//*[@numFound="1"] ++id:45 +text:"cc dd" %//*[@numFound="1"] + + #trigger output of custom value test values %%qt=test Modified: incubator/solr/trunk/src/apps/SolarTest/schema.xml URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/apps/SolarTest/schema.xml?rev=374539&r1=374538&r2=374539&view=diff ============================================================================== --- incubator/solr/trunk/src/apps/SolarTest/schema.xml (original) +++ incubator/solr/trunk/src/apps/SolarTest/schema.xml Thu Feb 2 15:01:47 2006 @@ -225,7 +225,16 @@ </fieldtype> <fieldtype name="unstored" class="solar.StrField" indexed="true" stored="false"/> - </types> + + + <fieldtype name="textgap" class="solar.TextField" multiValued="true" positionIncrementGap="100"> + <analyzer> + <tokenizer class="solar.WhitespaceTokenizerFactory"/> + <filter class="solar.LowerCaseFilterFactory"/> + </analyzer> + </fieldtype> + + </types> <fields> @@ -281,6 +290,8 @@ <field name="sku1" type="skutype1" indexed="true" stored="true"/> <field name="sku2" type="skutype2" indexed="true" stored="true"/> + <field name="textgap" type="textgap" indexed="true" stored="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 @@ -307,6 +318,7 @@ <!-- for testing to ensure that longer patterns are matched first --> <dynamicField name="*aa" type="string" indexed="true" stored="true"/> <dynamicField name="*aaa" type="integer" indexed="false" stored="true"/> + </fields> Added: incubator/solr/trunk/src/java/org/apache/solr/analysis/SolrAnalyzer.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/analysis/SolrAnalyzer.java?rev=374539&view=auto ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/analysis/SolrAnalyzer.java (added) +++ incubator/solr/trunk/src/java/org/apache/solr/analysis/SolrAnalyzer.java Thu Feb 2 15:01:47 2006 @@ -0,0 +1,19 @@ +package org.apache.solr.analysis; + +import org.apache.lucene.analysis.Analyzer; + +/** + * @author yonik + * @version $Id$ + */ +public abstract class SolrAnalyzer extends Analyzer { + int posIncGap=0; + + public void setPositionIncrementGap(int gap) { + posIncGap=gap; + } + + public int getPositionIncrementGap(String fieldName) { + return posIncGap; + } +} Modified: incubator/solr/trunk/src/java/org/apache/solr/analysis/TokenizerChain.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/analysis/TokenizerChain.java?rev=374539&r1=374538&r2=374539&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/analysis/TokenizerChain.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/analysis/TokenizerChain.java Thu Feb 2 15:01:47 2006 @@ -31,7 +31,7 @@ // An analyzer that uses a tokenizer and a list of token filters to // create a TokenStream. // -public class TokenizerChain extends Analyzer { +public class TokenizerChain extends SolrAnalyzer { final private TokenizerFactory tokenizer; final private TokenFilterFactory[] filters; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/BoolField.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/BoolField.java?rev=374539&r1=374538&r2=374539&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/BoolField.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/BoolField.java Thu Feb 2 15:01:47 2006 @@ -25,6 +25,7 @@ import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.document.Field; import org.apache.solr.request.XMLWriter; +import org.apache.solr.analysis.SolrAnalyzer; import java.util.Map; import java.io.Reader; @@ -54,7 +55,7 @@ // handle single valued non-text fields (int,bool,etc) if needed. - protected final static Analyzer boolAnalyzer = new Analyzer() { + protected final static Analyzer boolAnalyzer = new SolrAnalyzer() { public TokenStream tokenStream(String fieldName, Reader reader) { return new Tokenizer(reader) { boolean done=false; Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/FieldType.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/FieldType.java?rev=374539&r1=374538&r2=374539&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/FieldType.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/FieldType.java Thu Feb 2 15:01:47 2006 @@ -26,6 +26,7 @@ import org.apache.solr.search.function.OrdFieldSource; import org.apache.solr.search.Sorting; import org.apache.solr.request.XMLWriter; +import org.apache.solr.analysis.SolrAnalyzer; import java.util.logging.Logger; import java.util.Map; @@ -48,10 +49,6 @@ protected int falseProperties; // properties explicitly set to false int properties; - // these are common enough, they were moved to the base class to handle. - // not all subclasses will be able to support these options. - protected int positionIncrementGap; - protected boolean isTokenized() { return (properties & TOKENIZED) != 0; } @@ -73,12 +70,6 @@ this.args=args; Map<String,String> initArgs = new HashMap<String,String>(args); - String str; - - str = initArgs.get("positionIncrementGap"); - if (str!=null) positionIncrementGap = Integer.parseInt(str); - initArgs.remove("positionIncrementGap"); - trueProperties = FieldProperties.parseProperties(initArgs,true); falseProperties = FieldProperties.parseProperties(initArgs,false); @@ -89,6 +80,23 @@ init(schema, initArgs); + String positionInc = initArgs.get("positionIncrementGap"); + if (positionInc != null) { + Analyzer analyzer = getAnalyzer(); + if (analyzer instanceof SolrAnalyzer) { + ((SolrAnalyzer)analyzer).setPositionIncrementGap(Integer.parseInt(positionInc)); + } else { + throw new RuntimeException("Can't set positionIncrementGap on custom analyzer " + analyzer.getClass()); + } + analyzer = getQueryAnalyzer(); + if (analyzer instanceof SolrAnalyzer) { + ((SolrAnalyzer)analyzer).setPositionIncrementGap(Integer.parseInt(positionInc)); + } else { + throw new RuntimeException("Can't set positionIncrementGap on custom analyzer " + analyzer.getClass()); + } + initArgs.remove("positionIncrementGap"); + } + if (initArgs.size() > 0) { throw new RuntimeException("schema fieldtype " + typeName + "("+ this.getClass().getName() + ")" @@ -195,7 +203,7 @@ // Default analyzer for types that only produce 1 verbatim token... // A maximum size of chars to be read must be specified // - protected final class DefaultAnalyzer extends Analyzer { + protected final class DefaultAnalyzer extends SolrAnalyzer { final int maxChars; DefaultAnalyzer(int maxChars) { @@ -212,10 +220,6 @@ return new Token(s,0,n); }; }; - } - - public int getPositionIncrementGap(String fieldName) { - return positionIncrementGap; } } Modified: incubator/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java?rev=374539&r1=374538&r2=374539&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java Thu Feb 2 15:01:47 2006 @@ -121,10 +121,10 @@ - private class SolrAnalyzer extends Analyzer { + private class SolrIndexAnalyzer extends Analyzer { protected final HashMap<String,Analyzer> analyzers; - SolrAnalyzer() { + SolrIndexAnalyzer() { analyzers = analyzerCache(); } @@ -154,7 +154,7 @@ } - private class SolrQueryAnalyzer extends SolrAnalyzer { + private class SolrQueryAnalyzer extends SolrIndexAnalyzer { protected HashMap<String,Analyzer> analyzerCache() { HashMap<String,Analyzer> cache = new HashMap<String,Analyzer>(); for (SchemaField f : getFields().values()) { @@ -348,7 +348,7 @@ throw new SolrException(1,"Schema Parsing Failed",e,false); } - analyzer = new SolrAnalyzer(); + analyzer = new SolrIndexAnalyzer(); queryAnalyzer = new SolrQueryAnalyzer(); } From solr-commitshinesstephen@example.com Fri Feb 03 15:10:43 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 40526 invoked from network); 3 Feb 2006 15:10:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Feb 2006 15:10:43 -0000 Received: (qmail 40530 invoked by uid 500); 3 Feb 2006 15:10:43 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 40504 invoked by uid 500); 3 Feb 2006 15:10:42 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 40495 invoked by uid 99); 3 Feb 2006 15:10:42 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2006 07:10:42 -0800 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 41510C9 for <hinesstephen@example.com>; Fri, 3 Feb 2006 16:10:21 +0100 (CET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki <hinesstephen@example.com> To: hinesstephen@example.com Date: Fri, 03 Feb 2006 15:10:21 -0000 Message-ID: <hinesstephen@example.com> Subject: [Solr Wiki] Update of "FrontPage" by YonikSeeley X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification. The following page has been changed by YonikSeeley: http://wiki.apache.org/solr/FrontPage ------------------------------------------------------------------------------ == Solr Development == * ["Website Update HOWTO"] + * TaskList == How to use this site == A Wiki is a collaborative site, anyone can contribute and share: From solr-commitshinesstephen@example.com Fri Feb 03 15:39:55 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 57752 invoked from network); 3 Feb 2006 15:39:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Feb 2006 15:39:54 -0000 Received: (qmail 24275 invoked by uid 500); 3 Feb 2006 15:39:52 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 24238 invoked by uid 500); 3 Feb 2006 15:39:52 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 24206 invoked by uid 99); 3 Feb 2006 15:39:52 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2006 07:39:51 -0800 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id F20D5C9 for <hinesstephen@example.com>; Fri, 3 Feb 2006 16:39:30 +0100 (CET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki <hinesstephen@example.com> To: hinesstephen@example.com Date: Fri, 03 Feb 2006 15:39:30 -0000 Message-ID: <hinesstephen@example.com> Subject: [Solr Wiki] Update of "TaskList" by YonikSeeley X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification. The following page has been changed by YonikSeeley: http://wiki.apache.org/solr/TaskList New page: == Make things presentable to a wider audience (developers, like java-user@lucene) == * Migrate to Apache, change names to solr, make buildable * let Solr find config via server's cwd by default (for easly setup) * Example/Demo * Do they have to build themselves, or can we provide a precompiled WAR & config (and maybe even servlet container?) * Tutorial on solr website * Clean up straggling CNET links on admin pages, remove links that no longer apply (resin-status, etc) * Minimum Documentation * Feature List on Website * Tutorial on Website (get them started with the Demo) From solr-commitshinesstephen@example.com Fri Feb 03 21:57:14 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 78955 invoked from network); 3 Feb 2006 21:57:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Feb 2006 21:57:14 -0000 Received: (qmail 94497 invoked by uid 500); 3 Feb 2006 21:57:14 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 94471 invoked by uid 500); 3 Feb 2006 21:57:14 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 94461 invoked by uid 99); 3 Feb 2006 21:57:14 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2006 13:57:13 -0800 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 8EB99C9 for <hinesstephen@example.com>; Fri, 3 Feb 2006 22:56:52 +0100 (CET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki <hinesstephen@example.com> To: hinesstephen@example.com Date: Fri, 03 Feb 2006 21:56:52 -0000 Message-ID: <hinesstephen@example.com> Subject: [Solr Wiki] Update of "TaskList" by YonikSeeley X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification. The following page has been changed by YonikSeeley: http://wiki.apache.org/solr/TaskList ------------------------------------------------------------------------------ == Make things presentable to a wider audience (developers, like java-user@lucene) == * Migrate to Apache, change names to solr, make buildable - * let Solr find config via server's cwd by default (for easly setup) + * let Solr find config via server's cwd by default (for easy setup) * Example/Demo * Do they have to build themselves, or can we provide a precompiled WAR & config (and maybe even servlet container?) - * Tutorial on solr website * Clean up straggling CNET links on admin pages, remove links that no longer apply (resin-status, etc) * Minimum Documentation * Feature List on Website - * Tutorial on Website (get them started with the Demo) + * Tutorial on Website (walk through install & demo) + * How to build (if not part of tutorial) + == Near Term Tasks == + * Move webapp from ROOT to solr + * provide alternate way to specify where solr configuration and index directories are (don't have to depend on cwd) + * make indexing easier (it currently requires an HTTP POST of an XML document + * be able to load a text file, with variable delimiters + * point it at a database and give it SQL + * try and clean up css for IE + * clean up the admin pages more, refactor repeated code, remove stuff that doesn't work + * figure out how user can supply a plugin, since we can't depend on the previous method we had used with resin (which added a webapp external directory to the classpath). + * Documentation + * Analyzer components available from the schema + * Document how to set up distribution/replication + * Standard Query Handler: query params + * result XML format + * update XML format + * analysis stuff (available tokenizers and filters) + * Replication + * clean up the scripts, provide an alternate configuration mechanism (in the CNET internal version, + they had macro expansion performed on them) + * Testing + * make more JUnit tests + * try to make the current big testapp more modular, and maybe make a junit test out of it. + + == Ideas for the future == + * Alternate replication strategy that can work on Windows? + From solr-commitshinesstephen@example.com Mon Feb 06 15:17:23 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 36532 invoked from network); 6 Feb 2006 15:17:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Feb 2006 15:17:23 -0000 Received: (qmail 62013 invoked by uid 500); 6 Feb 2006 15:17:22 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 61988 invoked by uid 500); 6 Feb 2006 15:17:22 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 61979 invoked by uid 99); 6 Feb 2006 15:17:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 07:17:22 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 06 Feb 2006 07:17:21 -0800 Received: (qmail 36382 invoked by uid 65534); 6 Feb 2006 15:17:01 -0000 Message-ID: <hinesstephen@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r375296 - in /incubator/solr/trunk/lib: lucene-core-nightly.jar lucene-snowball-nightly.jar Date: Mon, 06 Feb 2006 15:17:01 -0000 To: hinesstephen@example.com From: hinesstephen@example.com X-Mailer: svnmailer-1.0.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: yonik Date: Mon Feb 6 07:17:00 2006 New Revision: 375296 URL: http://svn.apache.org/viewcvs?rev=375296&view=rev Log: lucene_nightly_20060206 Modified: incubator/solr/trunk/lib/lucene-core-nightly.jar incubator/solr/trunk/lib/lucene-snowball-nightly.jar Modified: incubator/solr/trunk/lib/lucene-core-nightly.jar URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/lib/lucene-core-nightly.jar?rev=375296&r1=375295&r2=375296&view=diff ============================================================================== Binary files - no diff available. Modified: incubator/solr/trunk/lib/lucene-snowball-nightly.jar URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/lib/lucene-snowball-nightly.jar?rev=375296&r1=375295&r2=375296&view=diff ============================================================================== Binary files - no diff available. From solr-commitshinesstephen@example.com Mon Feb 06 16:25:23 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 75363 invoked from network); 6 Feb 2006 16:25:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Feb 2006 16:25:23 -0000 Received: (qmail 88756 invoked by uid 500); 6 Feb 2006 16:25:16 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 88693 invoked by uid 500); 6 Feb 2006 16:25:16 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 88651 invoked by uid 99); 6 Feb 2006 16:25:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 08:25:16 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 06 Feb 2006 08:25:15 -0800 Received: (qmail 75035 invoked by uid 65534); 6 Feb 2006 16:24:44 -0000 Message-ID: <hinesstephen@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r375308 - in /incubator/solr/trunk: build.xml src/java/org/apache/solr/search/SolrIndexSearcher.java src/lucene_extras/ Date: Mon, 06 Feb 2006 16:24:24 -0000 To: hinesstephen@example.com From: hinesstephen@example.com X-Mailer: svnmailer-1.0.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: yonik Date: Mon Feb 6 08:24:21 2006 New Revision: 375308 URL: http://svn.apache.org/viewcvs?rev=375308&view=rev Log: remove lucene package and lucene_extras dir, FieldSortedHitQueue is now public in lucene. Removed: incubator/solr/trunk/src/lucene_extras/ Modified: incubator/solr/trunk/build.xml incubator/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java Modified: incubator/solr/trunk/build.xml URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/build.xml?rev=375308&r1=375307&r2=375308&view=diff ============================================================================== --- incubator/solr/trunk/build.xml (original) +++ incubator/solr/trunk/build.xml Mon Feb 6 08:24:21 2006 @@ -43,10 +43,7 @@ <!-- The compilation classpath --> <path id="compile.classpath"> <fileset dir="${lib}"> - <include name="lucene-core-nightly.jar" /> - <include name="lucene-snowball-nightly.jar" /> - <include name="servlet-api-2.4.jar" /> - <include name="xpp3-83.161.120.155.O.jar" /> + <include name="*.jar" /> </fileset> </path> @@ -60,14 +57,6 @@ <src path="${src}/java" /> <src path="${src}/webapp" /> - <!-- This dir includes tests, but is needed by core: need to split these up --> - <!-- A better name for this directory is needed anyways. --> - <src path="${src}/lucene_extras" > - </src> - - <!-- Only need this for now because lucene_extras has a test class --> - <exclude name="**/Test*" /> - </javac> </target> @@ -123,7 +112,7 @@ webxml="${src}/webapp/WEB-INF/web.xml"> <classes dir="${dest}" /> <lib dir="${lib}"> - <exclude name="servlet-api-2.4.jar" /> + <exclude name="servlet-api-*.jar" /> </lib> @@ -150,7 +139,7 @@ basedir="${dest}" /> <zip destfile="${dist}/${ant.project.name}-${version}.zip" - basedir="${dist}" /> + basedir="${dest}" /> </target> -</project> \ No newline at end of file +</project> Modified: incubator/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java?rev=375308&r1=375307&r2=375308&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java Mon Feb 6 08:24:21 2006 @@ -696,17 +696,19 @@ // NOTE: this changed late in Lucene 1.9 final DocSet filt = filter; - final PublicFieldSortedHitQueue hq = new PublicFieldSortedHitQueue(reader, lsort.getSort(), offset+len); + final int[] numHits = new int[1]; + final FieldSortedHitQueue hq = new FieldSortedHitQueue(reader, lsort.getSort(), offset+len); searcher.search(query, new HitCollector() { public void collect(int doc, float score) { if (filt!=null && !filt.exists(doc)) return; + numHits[0]++; hq.insert(new FieldDoc(doc, score)); } } ); - totalHits = hq.getTotalHits(); + totalHits = numHits[0]; maxScore = totalHits>0 ? hq.getMaxScore() : 0.0f; nDocsReturned = hq.size(); @@ -916,8 +918,8 @@ protected DocList sortDocSet(DocSet set, Sort sort, int nDocs) throws IOException { - final PublicFieldSortedHitQueue hq = - new PublicFieldSortedHitQueue(reader, sort.getSort(), nDocs); + final FieldSortedHitQueue hq = + new FieldSortedHitQueue(reader, sort.getSort(), nDocs); DocIterator iter = set.iterator(); int hits=0; while(iter.hasNext()) { From solr-commitshinesstephen@example.com Mon Feb 06 17:35:15 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 14773 invoked from network); 6 Feb 2006 17:35:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Feb 2006 17:35:15 -0000 Received: (qmail 99839 invoked by uid 500); 6 Feb 2006 17:35:15 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 99816 invoked by uid 500); 6 Feb 2006 17:35:14 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 99807 invoked by uid 99); 6 Feb 2006 17:35:14 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 09:35:14 -0800 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 2E3C6C9 for <hinesstephen@example.com>; Mon, 6 Feb 2006 18:34:53 +0100 (CET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki <hinesstephen@example.com> To: hinesstephen@example.com Date: Mon, 06 Feb 2006 17:34:52 -0000 Message-ID: <hinesstephen@example.com> Subject: [Solr Wiki] Update of "TaskList" by YonikSeeley X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification. The following page has been changed by YonikSeeley: http://wiki.apache.org/solr/TaskList ------------------------------------------------------------------------------ * try and clean up css for IE * clean up the admin pages more, refactor repeated code, remove stuff that doesn't work * figure out how user can supply a plugin, since we can't depend on the previous method we had used with resin (which added a webapp external directory to the classpath). + * Simple faceted browsing (grouping) support in the standard query handler + * group by field (provide counts for each distinct value in that field) + * group by (query1, query2, query3, query4, query5) * Documentation * Analyzer components available from the schema * Document how to set up distribution/replication @@ -35, +38 @@ * try to make the current big testapp more modular, and maybe make a junit test out of it. == Ideas for the future == - * Alternate replication strategy that can work on Windows? + * Alternate replication strategy that can work on Windows? + * A more powerful query language allowing one to express complicated logic without resorting to a custom Java query handler plugin. From solr-commitshinesstephen@example.com Mon Feb 06 21:35:44 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 35788 invoked from network); 6 Feb 2006 21:35:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Feb 2006 21:35:43 -0000 Received: (qmail 72133 invoked by uid 500); 6 Feb 2006 21:35:39 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 72112 invoked by uid 500); 6 Feb 2006 21:35:39 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 72103 invoked by uid 99); 6 Feb 2006 21:35:38 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 13:35:38 -0800 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 95E3FC9 for <hinesstephen@example.com>; Mon, 6 Feb 2006 22:35:17 +0100 (CET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki <hinesstephen@example.com> To: hinesstephen@example.com Date: Mon, 06 Feb 2006 21:35:17 -0000 Message-ID: <hinesstephen@example.com> Subject: [Solr Wiki] Update of "TaskList" by YonikSeeley X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification. The following page has been changed by YonikSeeley: http://wiki.apache.org/solr/TaskList ------------------------------------------------------------------------------ * Testing * make more JUnit tests * try to make the current big testapp more modular, and maybe make a junit test out of it. + * Live demo server or application (perhaps host on apache lucene zone) + * Mailing List Index? == Ideas for the future == * Alternate replication strategy that can work on Windows? From solr-commitshinesstephen@example.com Tue Feb 07 02:59:21 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 53839 invoked from network); 7 Feb 2006 02:59:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Feb 2006 02:59:21 -0000 Received: (qmail 92607 invoked by uid 500); 7 Feb 2006 02:59:21 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 92582 invoked by uid 500); 7 Feb 2006 02:59:20 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 92572 invoked by uid 99); 7 Feb 2006 02:59:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 18:59:20 -0800 X-ASF-Spam-Status: No, hits=-8.6 required=10.0 tests=ALL_TRUSTED,INFO_TLD,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 06 Feb 2006 18:59:19 -0800 Received: (qmail 53736 invoked by uid 65534); 7 Feb 2006 02:58:59 -0000 Message-ID: <hinesstephen@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r375449 - in /incubator/solr/trunk/src: apps/SolarTest/src/ java/org/apache/solr/core/ java/org/apache/solr/update/ webapp/resources/admin/ webapp/src/org/apache/solr/servlet/ Date: Tue, 07 Feb 2006 02:58:57 -0000 To: hinesstephen@example.com From: hinesstephen@example.com X-Mailer: svnmailer-1.0.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: yonik Date: Mon Feb 6 18:58:55 2006 New Revision: 375449 URL: http://svn.apache.org/viewcvs?rev=375449&view=rev Log: look for config files in ./conf and the main index in ./data/index by default Modified: incubator/solr/trunk/src/apps/SolarTest/src/SolrTest.java incubator/solr/trunk/src/java/org/apache/solr/core/Config.java incubator/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java incubator/solr/trunk/src/java/org/apache/solr/core/SolrCore.java incubator/solr/trunk/src/java/org/apache/solr/update/UpdateHandler.java incubator/solr/trunk/src/webapp/resources/admin/solar-status.jsp incubator/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrServlet.java Modified: incubator/solr/trunk/src/apps/SolarTest/src/SolrTest.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/apps/SolarTest/src/SolrTest.java?rev=375449&r1=375448&r2=375449&view=diff ============================================================================== --- incubator/solr/trunk/src/apps/SolarTest/src/SolrTest.java (original) +++ incubator/solr/trunk/src/apps/SolarTest/src/SolrTest.java Mon Feb 6 18:58:55 2006 @@ -286,8 +286,8 @@ String filename="dict.txt"; String updateFilename="update_dict.txt"; - String luceneDir=null; - String schemaFile="schema.xml"; + String dataDir =null; + String schemaFile=null; String testFile=null; boolean b_numUpdates=false; boolean b_writers=false; @@ -299,8 +299,8 @@ verbose=true; } else if (arg.equals("-dict")) { filename=args[i++]; - } else if (arg.equals("-index")) { - luceneDir=args[i++]; + } else if (arg.equals("-data")) { + dataDir =args[i++]; } else if (arg.equals("-readers")) { readers=Integer.parseInt(args[i++]); } else if (arg.equals("-numRequests")) { @@ -322,16 +322,17 @@ try { - IndexSchema schema = new IndexSchema(schemaFile); + IndexSchema schema = schemaFile==null ? null : new IndexSchema(schemaFile); countdown = requests; - core=new SolrCore(luceneDir,schema); + core=new SolrCore(dataDir,schema); try { - if (readers > 0) requestDict = readDict(filename); - if (writers > 0) updateDict = readDict(updateFilename); if (testFile != null) { testDict = readDict(testFile); testDictLineno = lineno; + } else { + if (readers > 0) requestDict = readDict(filename); + if (writers > 0) updateDict = readDict(updateFilename); } } catch (IOException e) { e.printStackTrace(); Modified: incubator/solr/trunk/src/java/org/apache/solr/core/Config.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/core/Config.java?rev=375449&r1=375448&r2=375449&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/core/Config.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/core/Config.java Mon Feb 6 18:58:55 2006 @@ -220,10 +220,31 @@ public static InputStream openResource(String resource) { - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - InputStream is = loader.getResourceAsStream(resource); + InputStream is=null; + + try { + File f = new File(resource); + if (!f.isAbsolute()) { + // try $CWD/conf/ + f = new File("conf/" + resource); + } + if (f.isFile() && f.canRead()) { + return new FileInputStream(f); + } else { + // try $CWD + f = new File(resource); + if (f.isFile() && f.canRead()) { + return new FileInputStream(f); + } + } + + ClassLoader loader = Thread.currentThread().getContextClassLoader(); + is = loader.getResourceAsStream(resource); + } catch (Exception e) { + throw new RuntimeException("Error opening " + resource, e); + } if (is==null) { - throw new SolrException(500,"Can't open " + resource); + throw new RuntimeException("Can't find resource " + resource); } return is; } Modified: incubator/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java?rev=375449&r1=375448&r2=375449&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java Mon Feb 6 18:58:55 2006 @@ -43,7 +43,7 @@ } catch (Exception ee) { throw new RuntimeException(ee); } - Config.log.info("Loaded Config solarconfig.xml"); + Config.log.info("Loaded Config solrconfig.xml"); } else { throw new RuntimeException(e); } Modified: incubator/solr/trunk/src/java/org/apache/solr/core/SolrCore.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/core/SolrCore.java?rev=375449&r1=375448&r2=375449&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/core/SolrCore.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/core/SolrCore.java Mon Feb 6 18:58:55 2006 @@ -64,6 +64,7 @@ public static Logger log = Logger.getLogger(SolrCore.class.getName()); private final IndexSchema schema; + private final String dataDir; private final String index_path; private final UpdateHandler updateHandler; @@ -98,10 +99,9 @@ newSearcherListeners = parseListener("//listener[@event=\"newSearcher\"]"); } - public IndexSchema getSchema() { return schema; } - public String getDir() { return index_path; } - + public String getDataDir() { return index_path; } + public String getIndexDir() { return index_path; } private final RequestHandlers reqHandlers = new RequestHandlers(SolrConfig.config); @@ -130,23 +130,22 @@ // gets a non-caching searcher public SolrIndexSearcher newSearcher(String name) throws IOException { - return new SolrIndexSearcher(schema, name,getDir(),false); + return new SolrIndexSearcher(schema, name,getDataDir(),false); } void initIndex() { try { - File dirFile = new File(getDir()); + File dirFile = new File(getIndexDir()); boolean indexExists = dirFile.canRead(); - boolean removeLocks = SolrConfig.config.getBool("mainIndex/unlockOnStartup", false); if (removeLocks) { // to remove locks, the directory must already exist... so we create it // if it didn't exist already... Directory dir = FSDirectory.getDirectory(dirFile, !indexExists); if (IndexReader.isLocked(dir)) { - log.warning("WARNING: Solr index directory '" + getDir() + "' is locked. Unlocking..."); + log.warning("WARNING: Solr index directory '" + getDataDir() + "' is locked. Unlocking..."); IndexReader.unlock(dir); } } @@ -157,7 +156,7 @@ log.warning("Solr index directory '" + dirFile + "' doesn't exist." + " Creating new index..."); - SolrIndexWriter writer = new SolrIndexWriter("SolrCore.initIndex",getDir(), true, schema, mainIndexConfig); + SolrIndexWriter writer = new SolrIndexWriter("SolrCore.initIndex",getDataDir(), true, schema, mainIndexConfig); writer.close(); } @@ -192,24 +191,25 @@ } - public SolrCore(String index_path, IndexSchema schema) { + public SolrCore(String dataDir, IndexSchema schema) { synchronized (SolrCore.class) { // this is for backward compatibility (and also the reason // the sync block is needed) core = this; // set singleton try { - if (index_path==null) { - index_path=SolrConfig.config.get("indexDir","index"); + if (dataDir ==null) { + dataDir =SolrConfig.config.get("dataDir","data"); } - log.info("Opening new SolrCore at " + index_path); + log.info("Opening new SolrCore with data directory at " + dataDir); if (schema==null) { schema = new IndexSchema("schema.xml"); } this.schema = schema; - this.index_path = index_path; + this.dataDir = dataDir; + this.index_path = dataDir + "/" + "index"; parseListeners(); Modified: incubator/solr/trunk/src/java/org/apache/solr/update/UpdateHandler.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/update/UpdateHandler.java?rev=375449&r1=375448&r2=375449&view=diff ============================================================================== --- incubator/solr/trunk/src/java/org/apache/solr/update/UpdateHandler.java (original) +++ incubator/solr/trunk/src/java/org/apache/solr/update/UpdateHandler.java Mon Feb 6 18:58:55 2006 @@ -93,7 +93,7 @@ } protected SolrIndexWriter createMainIndexWriter(String name) throws IOException { - SolrIndexWriter writer = new SolrIndexWriter(name,core.getDir(), false, schema,SolrCore.mainIndexConfig); + SolrIndexWriter writer = new SolrIndexWriter(name,core.getIndexDir(), false, schema,SolrCore.mainIndexConfig); return writer; } Modified: incubator/solr/trunk/src/webapp/resources/admin/solar-status.jsp URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/webapp/resources/admin/solar-status.jsp?rev=375449&r1=375448&r2=375449&view=diff ============================================================================== --- incubator/solr/trunk/src/webapp/resources/admin/solar-status.jsp (original) +++ incubator/solr/trunk/src/webapp/resources/admin/solar-status.jsp Mon Feb 6 18:58:55 2006 @@ -56,7 +56,7 @@ <state>IN_SERVICE</state> <schemaFile>schema.xml</schemaFile> <schemaName><%= schema.getName() %></schemaName> - <indexDir><%= core.getDir() %></indexDir> + <indexDir><%= core.getDataDir() %></indexDir> <maxDoc><%= core.maxDoc() %></maxDoc> </status> </solr> Modified: incubator/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrServlet.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrServlet.java?rev=375449&r1=375448&r2=375449&view=diff ============================================================================== --- incubator/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrServlet.java (original) +++ incubator/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrServlet.java Mon Feb 6 18:58:55 2006 @@ -46,15 +46,15 @@ public void init() throws ServletException { - /*** - luceneDir=getServletContext().getInitParameter("solr.indexdir"); - schemaFile=getServletContext().getInitParameter("solr.schema"); - if (schemaFile == null) schemaFile="schema.xml"; - ***/ + String configDir=getServletContext().getInitParameter("solr.configDir"); + String dataDir=getServletContext().getInitParameter("solr.dataDir"); log.info("user.dir=" + System.getProperty("user.dir")); - IndexSchema schema = new IndexSchema("schema.xml"); + // TODO: find a way to allow configuration of the config and data + // directories other than using CWD. If it is done via servlet + // params, then we must insure that this init() run before any + // of the JSPs. core = SolrCore.getSolrCore(); xmlResponseWriter=new XMLResponseWriter(); From solr-commitshinesstephen@example.com Tue Feb 07 22:05:04 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 42689 invoked from network); 7 Feb 2006 22:05:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Feb 2006 22:05:04 -0000 Received: (qmail 44755 invoked by uid 500); 7 Feb 2006 22:05:03 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 44738 invoked by uid 500); 7 Feb 2006 22:05:03 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:hinesstephen@example.com> List-Unsubscribe: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: <solr-commits.lucene.apache.org> Reply-To: hinesstephen@example.com Delivered-To: mailing list hinesstephen@example.com Received: (qmail 44726 invoked by uid 99); 7 Feb 2006 22:05:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2006 14:05:03 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 07 Feb 2006 14:05:02 -0800 Received: (qmail 42364 invoked by uid 65534); 7 Feb 2006 22:04:41 -0000 Message-ID: <hinesstephen@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r375736 - in /incubator/solr/trunk: ./ src/apps/SolarTest/ src/apps/SolarTest/conf/ src/apps/SolarTest/src/ Date: Tue, 07 Feb 2006 22:04:40 -0000 To: hinesstephen@example.com From: hinesstephen@example.com X-Mailer: svnmailer-1.0.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: yonik Date: Tue Feb 7 14:04:39 2006 New Revision: 375736 URL: http://svn.apache.org/viewcvs?rev=375736&view=rev Log: make apps/SolarTest runnable via ant test Added: incubator/solr/trunk/src/apps/SolarTest/conf/ incubator/solr/trunk/src/apps/SolarTest/conf/protwords.txt - copied unchanged from r375450, incubator/solr/trunk/src/apps/SolarTest/protwords.txt incubator/solr/trunk/src/apps/SolarTest/conf/schema.xml - copied unchanged from r375450, incubator/solr/trunk/src/apps/SolarTest/schema.xml incubator/solr/trunk/src/apps/SolarTest/conf/solrconfig.xml - copied unchanged from r375450, incubator/solr/trunk/src/apps/SolarTest/solrconfig.xml incubator/solr/trunk/src/apps/SolarTest/conf/stopwords.txt - copied unchanged from r375450, incubator/solr/trunk/src/apps/SolarTest/stopwords.txt incubator/solr/trunk/src/apps/SolarTest/conf/synonyms.txt - copied unchanged from r375450, incubator/solr/trunk/src/apps/SolarTest/synonyms.txt Removed: incubator/solr/trunk/src/apps/SolarTest/protwords.txt incubator/solr/trunk/src/apps/SolarTest/run incubator/solr/trunk/src/apps/SolarTest/schema.xml incubator/solr/trunk/src/apps/SolarTest/solrconfig.xml incubator/solr/trunk/src/apps/SolarTest/stopwords.txt incubator/solr/trunk/src/apps/SolarTest/synonyms.txt Modified: incubator/solr/trunk/CHANGES.txt (props changed) incubator/solr/trunk/LICENSE.txt (props changed) incubator/solr/trunk/build.xml (contents, props changed) incubator/solr/trunk/src/apps/SolarTest/src/SolrTest.java Propchange: incubator/solr/trunk/CHANGES.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/solr/trunk/LICENSE.txt ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/solr/trunk/build.xml URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/build.xml?rev=375736&r1=375735&r2=375736&view=diff ============================================================================== --- incubator/solr/trunk/build.xml (original) +++ incubator/solr/trunk/build.xml Tue Feb 7 14:04:39 2006 @@ -70,6 +70,12 @@ <!-- For now, it's the same as main classpath. Later it will have JUnit, Clover, etc. --> <path id="test.compile.classpath"> <path refid="compile.classpath" /> + <pathelement location="${dest}"/> + </path> + + <path id="test.run.classpath"> + <path refid="test.compile.classpath" /> + <pathelement location="${dest}/tests"/> </path> <!-- Compile unit tests. --> @@ -77,10 +83,11 @@ description="Compile unit tests." depends="compile"> <mkdir dir="${dest}/tests" /> - <javac destdir="${dest}/tests" - classpathref="test.compile.classpath"> - <src dir="${src}/test" /> - <src dir="${src}/apps/SolarTest/src" /> + <javac + destdir="${dest}/tests" + classpathref="test.compile.classpath"> + <src path="${src}/test" /> + <src path="${src}/apps/SolarTest/src" /> </javac> </target> @@ -89,6 +96,14 @@ description="Runs the unit tests." depends="compileTests"> <echo message="TO-DO later or after we convert tests to JUnit." /> + + <java classname="SolrTest" fork="true" dir="src/apps/SolarTest" failonerror="true"> + <arg line="-test newtest.txt"/> + <classpath> + <path refid="test.run.classpath" /> + </classpath> + </java> + </target> @@ -103,7 +118,7 @@ description="Creates the Solr distribution files." depends="dist-src, dist-war, dist-bin" /> - <!-- Creates the demo WAR file. --> + <!-- Creates the Solr WAR file. --> <target name="dist-war" description="Creates the demo WAR file." depends="compile"> Propchange: incubator/solr/trunk/build.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/solr/trunk/src/apps/SolarTest/src/SolrTest.java URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/apps/SolarTest/src/SolrTest.java?rev=375736&r1=375735&r2=375736&view=diff ============================================================================== --- incubator/solr/trunk/src/apps/SolarTest/src/SolrTest.java (original) +++ incubator/solr/trunk/src/apps/SolarTest/src/SolrTest.java Tue Feb 7 14:04:39 2006 @@ -83,7 +83,9 @@ boolean sequenceTest=false; public void run() { + if (sequenceTest) { + try { for (int i=0; i<testDict.length; i++) { String s = testDict[i]; int lineno = testDictLineno.get(i); @@ -112,9 +114,9 @@ if (startParams > 0) params = s.substring(startParams+2,endParams).trim(); if (startTests > 0) test = s.substring(startTests+1,endTests).trim(); - System.out.println("###req=" + req); - System.out.println("###params=" + params); - System.out.println("###tests=" + test); + // System.out.println("###req=" + req); + // System.out.println("###params=" + params); + // System.out.println("###tests=" + test); if (req.startsWith("<")) { resp = doUpdate(req); @@ -127,6 +129,11 @@ System.out.println("#### no validation performed"); } } + } catch (RuntimeException e) { + numErr++; + throw(e); + } + System.out.println(">>>>>>>>>>>>>>>>>>>>>>>> SUCCESS <<<<<<<<<<<<<<<<<<<<<<<<<<"); } @@ -322,46 +329,60 @@ try { - IndexSchema schema = schemaFile==null ? null : new IndexSchema(schemaFile); - countdown = requests; - core=new SolrCore(dataDir,schema); + IndexSchema schema = schemaFile==null ? null : new IndexSchema(schemaFile); + countdown = requests; + core=new SolrCore(dataDir,schema); - try { - if (testFile != null) { - testDict = readDict(testFile); - testDictLineno = lineno; - } else { - if (readers > 0) requestDict = readDict(filename); - if (writers > 0) updateDict = readDict(updateFilename); + try { + if (testFile != null) { + testDict = readDict(testFile); + testDictLineno = lineno; + } else { + if (readers > 0) requestDict = readDict(filename); + if (writers > 0) updateDict = readDict(updateFilename); + } + } catch (IOException e) { + e.printStackTrace(); + System.out.println("Can't read "+filename); + return; } - } catch (IOException e) { - e.printStackTrace(); - System.out.println("Can't read "+filename); - return; - } - SolrTest[] clients = new SolrTest[readers+writers]; - for (i=0; i<readers; i++) { - clients[i] = new SolrTest(); - if (testFile != null) clients[i].sequenceTest=true; - clients[i].start(); - } - for (i=readers; i<readers+writers; i++) { - clients[i] = new SolrTest(); - clients[i].isWriter = true; - clients[i].start(); - } + SolrTest[] clients = new SolrTest[readers+writers]; + for (i=0; i<readers; i++) { + clients[i] = new SolrTest(); + if (testFile != null) clients[i].sequenceTest=true; + clients[i].start(); + } + for (i=readers; i<readers+writers; i++) { + clients[i] = new SolrTest(); + clients[i].isWriter = true; + clients[i].start(); + } - for (i=0; i<readers; i++) { - clients[i].join(); - } - for (i=readers; i<readers+writers; i++) { - clients[i].join(); - } + for (i=0; i<readers; i++) { + clients[i].join(); + } + for (i=readers; i<readers+writers; i++) { + clients[i].join(); + } + + core.close(); + core=null; - } finally { - if (core != null) core.close(); + if (testFile!=null) { + if (clients[0].numErr == 0) { + System.out.println(">>>>>>>>>>>>>>>>>>>>>>>> SUCCESS <<<<<<<<<<<<<<<<<<<<<<<<<<"); + } else { + System.exit(1); + } + } + + } catch (Throwable e) { + if (core!=null) {try{core.close();} catch (Throwable th){}} + e.printStackTrace(); + System.exit(1); } + } From solr-commitshinesstephen@example.com Tue Feb 07 22:09:42 2006 Return-Path: <solr-commitshinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 45630 invoked from network); 7 Feb 2006 22:09:42 -0000
{'source': 'Apache Software Foundation Public Mail Archives'}