From java-commitsjenny79@example.org Tue Aug 09 00:58:08 2005 Return-Path: <java-commitsjenny79@example.org> Delivered-To: jenny79@example.org Received: (qmail 84623 invoked from network); 9 Aug 2005 00:58:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Aug 2005 00:58:08 -0000 Received: (qmail 42630 invoked by uid 500); 9 Aug 2005 00:58:08 -0000 Delivered-To: jenny79@example.org Received: (qmail 42607 invoked by uid 500); 9 Aug 2005 00:58:07 -0000 Mailing-List: contact jenny79@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jenny79@example.org> List-Unsubscribe: <mailto:jenny79@example.org> List-Post: <mailto:jenny79@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: jenny79@example.org Delivered-To: mailing list jenny79@example.org Received: (qmail 42594 invoked by uid 99); 9 Aug 2005 00:58:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2005 17:58:07 -0700 X-ASF-Spam-Status: No, hits=-9.8 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, 08 Aug 2005 17:58:30 -0700 Received: (qmail 84618 invoked by uid 65534); 9 Aug 2005 00:58:06 -0000 Message-ID: <jenny79@example.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r230939 - in /lucene/java/trunk/src: java/org/apache/lucene/store/FSDirectory.java test/org/apache/lucene/index/store/FSDirectoryTest.java Date: Tue, 09 Aug 2005 00:58:05 -0000 To: jenny79@example.org From: jenny79@example.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: ehatcher Date: Mon Aug 8 17:58:01 2005 New Revision: 230939 URL: http://svn.apache.org/viewcvs?rev=230939&view=rev Log: Fix issue with lock file when org.apache.lucene.lockDir and java.io.tmpdir are not set Added: lucene/java/trunk/src/test/org/apache/lucene/index/store/FSDirectoryTest.java Modified: lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java Modified: lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java?rev=230939&r1=230938&r2=230939&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java Mon Aug 8 17:58:01 2005 @@ -146,6 +146,13 @@ else { lockDir = new File(LOCK_DIR); } + // Ensure that lockDir exists and is a directory. + if (!lockDir.exists()) { + if (!lockDir.mkdirs()) + throw new IOException("Cannot create directory: " + lockDir); + } else if (!lockDir.isDirectory()) { + throw new IOException("Found regular file where directory expected: " + lockDir); + } if (create) { create(); } Added: lucene/java/trunk/src/test/org/apache/lucene/index/store/FSDirectoryTest.java URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/test/org/apache/lucene/index/store/FSDirectoryTest.java?rev=230939&view=auto ============================================================================== --- lucene/java/trunk/src/test/org/apache/lucene/index/store/FSDirectoryTest.java (added) +++ lucene/java/trunk/src/test/org/apache/lucene/index/store/FSDirectoryTest.java Mon Aug 8 17:58:01 2005 @@ -0,0 +1,149 @@ +package org.apache.lucene.index.store; + +/** + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.io.File; +import java.io.IOException; + +import junit.framework.TestCase; + +import org.apache.lucene.analysis.standard.StandardAnalyzer; +import org.apache.lucene.index.IndexWriter; + +/** + * Test to illustrate the problem found when trying to open an IndexWriter in + * a situation where the the property <code>org.apache.lucene.lockDir</code> + * was not set and the one specified by <code>java.io.tmpdir</code> had been + * set to a non-existent path. What I observed is that this combination of + * conditions resulted in a <code>NullPointerException</code> being thrown in + * the <code>create()</code> method in <code>FSDirectory</code>, where + * <code>files.length</code> is de-referenced, but <code>files</code> is + * </code>null</code>. + * + * @author Michael Goddard + */ + +public class FSDirectoryTest extends TestCase { + + /** + * What happens if the Lucene lockDir doesn't exist? + * + * @throws Exception + */ + public void testNonExistentTmpDir() throws Exception { + orgApacheLuceneLockDir = System.setProperty( + "org.apache.lucene.lockDir", NON_EXISTENT_DIRECTORY); + String exceptionClassName = openIndexWriter(); + if (exceptionClassName == null + || exceptionClassName.equals("java.io.IOException")) + assertTrue(true); + else + fail("Caught an unexpected Exception"); + } + + /** + * What happens if the Lucene lockDir is a regular file instead of a + * directory? + * + * @throws Exception + */ + public void testTmpDirIsPlainFile() throws Exception { + shouldBeADirectory = new File(NON_EXISTENT_DIRECTORY); + shouldBeADirectory.createNewFile(); + String exceptionClassName = openIndexWriter(); + if (exceptionClassName == null + || exceptionClassName.equals("java.io.IOException")) + assertTrue(true); + else + fail("Caught an unexpected Exception"); + } + + public static final String FILE_SEP = System.getProperty("file.separator"); + + public static final String NON_EXISTENT_DIRECTORY = System + .getProperty("java.io.tmpdir") + + FILE_SEP + "highly_improbable_directory_name"; + + public static final String TEST_INDEX_DIR = System + .getProperty("java.io.tmpdir") + + FILE_SEP + "temp_index"; + + private String orgApacheLuceneLockDir; + + private File shouldBeADirectory; + + public void tearDown() { + if (orgApacheLuceneLockDir != null) + System.setProperty("org.apache.lucene.lockDir", + orgApacheLuceneLockDir); + if (shouldBeADirectory != null && shouldBeADirectory.exists()) { + try { + shouldBeADirectory.delete(); + } catch (Exception e) { + e.printStackTrace(); + } + } + File deletableIndex = new File(TEST_INDEX_DIR); + if (deletableIndex.exists()) + try { + rmDir(deletableIndex); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Open an IndexWriter<br> + * Catch any (expected) IOException<br> + * Close the IndexWriter + */ + private static String openIndexWriter() { + IndexWriter iw = null; + String ret = null; + try { + iw = new IndexWriter(TEST_INDEX_DIR, new StandardAnalyzer(), true); + } catch (IOException e) { + ret = e.toString(); + e.printStackTrace(); + } catch (NullPointerException e) { + ret = e.toString(); + e.printStackTrace(); + } finally { + if (iw != null) { + try { + iw.close(); + } catch (IOException ioe) { + // ignore this + } + } + } + return ret; + } + + private static void rmDir(File dirName) throws Exception { + if (dirName.exists()) { + if (dirName.isDirectory()) { + File[] contents = dirName.listFiles(); + for (int i = 0; i < contents.length; i++) + rmDir(contents[i]); + dirName.delete(); + } else { + dirName.delete(); + } + } + } +} From java-commitsjenny79@example.org Tue Aug 09 18:15:36 2005 Return-Path: <java-commitsjenny79@example.org> Delivered-To: jenny79@example.org Received: (qmail 32846 invoked from network); 9 Aug 2005 18:15:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Aug 2005 18:15:35 -0000 Received: (qmail 31392 invoked by uid 500); 9 Aug 2005 18:15:35 -0000 Delivered-To: jenny79@example.org Received: (qmail 31372 invoked by uid 500); 9 Aug 2005 18:15:34 -0000 Mailing-List: contact jenny79@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jenny79@example.org> List-Unsubscribe: <mailto:jenny79@example.org> List-Post: <mailto:jenny79@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: jenny79@example.org Delivered-To: mailing list jenny79@example.org Received: (qmail 31359 invoked by uid 99); 9 Aug 2005 18:15:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 11:15:34 -0700 X-ASF-Spam-Status: No, hits=-9.8 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, 09 Aug 2005 11:15:57 -0700 Received: (qmail 32833 invoked by uid 65534); 9 Aug 2005 18:15:33 -0000 Message-ID: <jenny79@example.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r231075 - /lucene/java/trunk/src/java/org/apache/lucene/search/FieldDocSortedHitQueue.java Date: Tue, 09 Aug 2005 18:15:33 -0000 To: jenny79@example.org From: jenny79@example.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: dnaber Date: Tue Aug 9 11:15:30 2005 New Revision: 231075 URL: http://svn.apache.org/viewcvs?rev=231075&view=rev Log: avoid code duplication, patch by Stephane Bailliez (#36078) Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FieldDocSortedHitQueue.java Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FieldDocSortedHitQueue.java URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/search/FieldDocSortedHitQueue.java?rev=231075&r1=231074&r2=231075&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/search/FieldDocSortedHitQueue.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/search/FieldDocSortedHitQueue.java Tue Aug 9 11:15:30 2005 @@ -107,97 +107,54 @@ int c = 0; for (int i=0; i<n && c==0; ++i) { final int type = fields[i].getType(); + switch (type) { + case SortField.SCORE: + float r1 = ((Float)docA.fields[i]).floatValue(); + float r2 = ((Float)docB.fields[i]).floatValue(); + if (r1 > r2) c = -1; + if (r1 < r2) c = 1; + break; + case SortField.DOC: + case SortField.INT: + int i1 = ((Integer)docA.fields[i]).intValue(); + int i2 = ((Integer)docB.fields[i]).intValue(); + if (i1 < i2) c = -1; + if (i1 > i2) c = 1; + break; + case SortField.STRING: + String s1 = (String) docA.fields[i]; + String s2 = (String) docB.fields[i]; + // null values need to be sorted first, because of how FieldCache.getStringIndex() + // works - in that routine, any documents without a value in the given field are + // put first. + if (s1 == null) c = -1; // could be null if there are + else if (s2 == null) c = 1; // no terms in the given field + else if (fields[i].getLocale() == null) { + c = s1.compareTo(s2); + } else { + c = collators[i].compare (s1, s2); + } + break; + case SortField.FLOAT: + float f1 = ((Float)docA.fields[i]).floatValue(); + float f2 = ((Float)docB.fields[i]).floatValue(); + if (f1 < f2) c = -1; + if (f1 > f2) c = 1; + break; + case SortField.CUSTOM: + c = docA.fields[i].compareTo (docB.fields[i]); + break; + case SortField.AUTO: + // we cannot handle this - even if we determine the type of object (Float or + // Integer), we don't necessarily know how to compare them (both SCORE and + // FLOAT contain floats, but are sorted opposite of each other). Before + // we get here, each AUTO should have been replaced with its actual value. + throw new RuntimeException ("FieldDocSortedHitQueue cannot use an AUTO SortField"); + default: + throw new RuntimeException ("invalid SortField type: "+type); + } if (fields[i].getReverse()) { - switch (type) { - case SortField.SCORE: - float r1 = ((Float)docA.fields[i]).floatValue(); - float r2 = ((Float)docB.fields[i]).floatValue(); - if (r1 < r2) c = -1; - if (r1 > r2) c = 1; - break; - case SortField.DOC: - case SortField.INT: - int i1 = ((Integer)docA.fields[i]).intValue(); - int i2 = ((Integer)docB.fields[i]).intValue(); - if (i1 > i2) c = -1; - if (i1 < i2) c = 1; - break; - case SortField.STRING: - String s1 = (String) docA.fields[i]; - String s2 = (String) docB.fields[i]; - if (s2 == null) c = -1; // could be null if there are - else if (s1 == null) c = 1; // no terms in the given field - else if (fields[i].getLocale() == null) { - c = s2.compareTo(s1); - } else { - c = collators[i].compare (s2, s1); - } - break; - case SortField.FLOAT: - float f1 = ((Float)docA.fields[i]).floatValue(); - float f2 = ((Float)docB.fields[i]).floatValue(); - if (f1 > f2) c = -1; - if (f1 < f2) c = 1; - break; - case SortField.CUSTOM: - c = docB.fields[i].compareTo (docA.fields[i]); - break; - case SortField.AUTO: - // we cannot handle this - even if we determine the type of object (Float or - // Integer), we don't necessarily know how to compare them (both SCORE and - // FLOAT both contain floats, but are sorted opposite of each other). Before - // we get here, each AUTO should have been replaced with its actual value. - throw new RuntimeException ("FieldDocSortedHitQueue cannot use an AUTO SortField"); - default: - throw new RuntimeException ("invalid SortField type: "+type); - } - } else { - switch (type) { - case SortField.SCORE: - float r1 = ((Float)docA.fields[i]).floatValue(); - float r2 = ((Float)docB.fields[i]).floatValue(); - if (r1 > r2) c = -1; - if (r1 < r2) c = 1; - break; - case SortField.DOC: - case SortField.INT: - int i1 = ((Integer)docA.fields[i]).intValue(); - int i2 = ((Integer)docB.fields[i]).intValue(); - if (i1 < i2) c = -1; - if (i1 > i2) c = 1; - break; - case SortField.STRING: - String s1 = (String) docA.fields[i]; - String s2 = (String) docB.fields[i]; - // null values need to be sorted first, because of how FieldCache.getStringIndex() - // works - in that routine, any documents without a value in the given field are - // put first. - if (s1 == null) c = -1; // could be null if there are - else if (s2 == null) c = 1; // no terms in the given field - else if (fields[i].getLocale() == null) { - c = s1.compareTo(s2); - } else { - c = collators[i].compare (s1, s2); - } - break; - case SortField.FLOAT: - float f1 = ((Float)docA.fields[i]).floatValue(); - float f2 = ((Float)docB.fields[i]).floatValue(); - if (f1 < f2) c = -1; - if (f1 > f2) c = 1; - break; - case SortField.CUSTOM: - c = docA.fields[i].compareTo (docB.fields[i]); - break; - case SortField.AUTO: - // we cannot handle this - even if we determine the type of object (Float or - // Integer), we don't necessarily know how to compare them (both SCORE and - // FLOAT both contain floats, but are sorted opposite of each other). Before - // we get here, each AUTO should have been replaced with its actual value. - throw new RuntimeException ("FieldDocSortedHitQueue cannot use an AUTO SortField"); - default: - throw new RuntimeException ("invalid SortField type: "+type); - } + c = -c; } } return c > 0; From java-commitsjenny79@example.org Tue Aug 09 18:41:54 2005 Return-Path: <java-commitsjenny79@example.org> Delivered-To: jenny79@example.org Received: (qmail 40017 invoked from network); 9 Aug 2005 18:41:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Aug 2005 18:41:53 -0000 Received: (qmail 86303 invoked by uid 500); 9 Aug 2005 18:41:53 -0000 Delivered-To: jenny79@example.org Received: (qmail 86287 invoked by uid 500); 9 Aug 2005 18:41:53 -0000 Mailing-List: contact jenny79@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jenny79@example.org> List-Unsubscribe: <mailto:jenny79@example.org> List-Post: <mailto:jenny79@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: jenny79@example.org Delivered-To: mailing list jenny79@example.org Received: (qmail 86274 invoked by uid 99); 9 Aug 2005 18:41:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 11:41:53 -0700 X-ASF-Spam-Status: No, hits=-9.8 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, 09 Aug 2005 11:42:16 -0700 Received: (qmail 40012 invoked by uid 65534); 9 Aug 2005 18:41:52 -0000 Message-ID: <jenny79@example.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r231078 - /lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java Date: Tue, 09 Aug 2005 18:41:52 -0000 To: jenny79@example.org From: jenny79@example.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: dnaber Date: Tue Aug 9 11:41:47 2005 New Revision: 231078 URL: http://svn.apache.org/viewcvs?rev=231078&view=rev Log: catch security exception so this class can be used from an applet; tiny improvement to the exception output (no toString()) Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java?rev=231078&r1=231077&r2=231078&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java Tue Aug 9 11:41:47 2005 @@ -32,8 +32,6 @@ import org.apache.lucene.util.BitVector; /** - * FIXME: Describe class <code>SegmentReader</code> here. - * * @version $Id$ */ class SegmentReader extends IndexReader { @@ -92,7 +90,7 @@ private Hashtable norms = new Hashtable(); /** The class which implements SegmentReader. */ - private static final Class IMPL; + private static Class IMPL; static { try { String name = @@ -100,7 +98,13 @@ SegmentReader.class.getName()); IMPL = Class.forName(name); } catch (ClassNotFoundException e) { - throw new RuntimeException("cannot load SegmentReader class: " + e.toString()); + throw new RuntimeException("cannot load SegmentReader class: " + e); + } catch (SecurityException se) { + try { + IMPL = Class.forName(SegmentReader.class.getName()); + } catch (ClassNotFoundException e) { + throw new RuntimeException("cannot load default SegmentReader class: " + e); + } } } @@ -123,7 +127,7 @@ try { instance = (SegmentReader)IMPL.newInstance(); } catch (Exception e) { - throw new RuntimeException("cannot load SegmentReader class: " + e.toString()); + throw new RuntimeException("cannot load SegmentReader class: " + e); } instance.init(dir, sis, closeDir, ownDir); instance.initialize(si); From java-commitsjenny79@example.org Tue Aug 09 20:12:59 2005 Return-Path: <java-commitsjenny79@example.org> Delivered-To: jenny79@example.org Received: (qmail 96917 invoked from network); 9 Aug 2005 20:12:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Aug 2005 20:12:59 -0000 Received: (qmail 17291 invoked by uid 500); 9 Aug 2005 20:12:59 -0000 Delivered-To: jenny79@example.org Received: (qmail 17272 invoked by uid 500); 9 Aug 2005 20:12:58 -0000 Mailing-List: contact jenny79@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jenny79@example.org> List-Unsubscribe: <mailto:jenny79@example.org> List-Post: <mailto:jenny79@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: jenny79@example.org Delivered-To: mailing list jenny79@example.org Received: (qmail 17259 invoked by uid 99); 9 Aug 2005 20:12:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 13:12:58 -0700 X-ASF-Spam-Status: No, hits=-9.8 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, 09 Aug 2005 13:13:21 -0700 Received: (qmail 96914 invoked by uid 65534); 9 Aug 2005 20:12:57 -0000 Message-ID: <jenny79@example.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r231098 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/store/FSDirectory.java Date: Tue, 09 Aug 2005 20:12:57 -0000 To: jenny79@example.org From: jenny79@example.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: dnaber Date: Tue Aug 9 13:12:50 2005 New Revision: 231098 URL: http://svn.apache.org/viewcvs?rev=231098&view=rev Log: use setter/getter instead of system property; catch security exception so Lucene can be used inside an applet Modified: lucene/java/trunk/CHANGES.txt lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java Modified: lucene/java/trunk/CHANGES.txt URL: http://svn.apache.org/viewcvs/lucene/java/trunk/CHANGES.txt?rev=231098&r1=231097&r2=231098&view=diff ============================================================================== --- lucene/java/trunk/CHANGES.txt (original) +++ lucene/java/trunk/CHANGES.txt Tue Aug 9 13:12:50 2005 @@ -53,6 +53,8 @@ org.apache.lucene.mergeFactor, See BooleanQuery for getter/setter methods: org.apache.lucene.maxClauseCount + See FSDirectory for getter/setter methods: + disableLuceneLocks (Daniel Naber) New features Modified: lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java?rev=231098&r1=231097&r2=231098&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java Tue Aug 9 13:12:50 2005 @@ -26,12 +26,9 @@ import java.util.Hashtable; import org.apache.lucene.index.IndexFileNameFilter; -import org.apache.lucene.util.Constants; /** * Straightforward implementation of {@link Directory} as a directory of files. - * <p>If the system property 'disableLuceneLocks' has the String value of - * "true", lock creation will be disabled. * * @see Directory * @author Doug Cutting @@ -47,8 +44,24 @@ */ private static final Hashtable DIRECTORIES = new Hashtable(); - private static final boolean DISABLE_LOCKS = - Boolean.getBoolean("disableLuceneLocks") || Constants.JAVA_1_1; + private static boolean disableLocks = false; + + /** + * Set whether Lucene's use of lock files is disabled. By default, + * lock files are enabled. They should only be disabled if the index + * is on a read-only medium like a CD-ROM. + */ + public static void setDisableLocks(boolean doDisableLocks) { + FSDirectory.disableLocks = doDisableLocks; + } + + /** + * Returns whether Lucene's use of lock files is disabled. + * @return true if locks are disabled, false if locks are enabled. + */ + public static boolean getDisableLocks() { + return FSDirectory.disableLocks; + } /** * Directory specified by <code>org.apache.lucene.lockDir</code> @@ -59,7 +72,7 @@ System.getProperty("java.io.tmpdir")); /** The default class which implements filesystem-based directories. */ - private static final Class IMPL; + private static Class IMPL; static { try { String name = @@ -68,6 +81,12 @@ IMPL = Class.forName(name); } catch (ClassNotFoundException e) { throw new RuntimeException("cannot load FSDirectory class: " + e.toString()); + } catch (SecurityException se) { + try { + IMPL = Class.forName(FSDirectory.class.getName()); + } catch (ClassNotFoundException e) { + throw new RuntimeException("cannot load default FSDirectory class: " + e.toString()); + } } } @@ -310,12 +329,7 @@ {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; /** Constructs a {@link Lock} with the specified name. Locks are implemented - * with {@link File#createNewFile() }. - * - * <p>In JDK 1.1 or if system property <I>disableLuceneLocks</I> is the - * string "true", locks are disabled. Assigning this property any other - * string will <B>not</B> prevent creation of lock files. This is useful for - * using Lucene on read-only medium, such as CD-ROM. + * with {@link File#createNewFile()}. * * @param name the name of the lock file * @return an instance of <code>Lock</code> holding the lock @@ -330,7 +344,7 @@ return new Lock() { public boolean obtain() throws IOException { - if (DISABLE_LOCKS) + if (disableLocks) return true; if (!lockDir.exists()) { @@ -342,12 +356,12 @@ return lockFile.createNewFile(); } public void release() { - if (DISABLE_LOCKS) + if (disableLocks) return; lockFile.delete(); } public boolean isLocked() { - if (DISABLE_LOCKS) + if (disableLocks) return false; return lockFile.exists(); } From java-commitsjenny79@example.org Tue Aug 09 20:17:59 2005 Return-Path: <java-commitsjenny79@example.org> Delivered-To: jenny79@example.org Received: (qmail 99736 invoked from network); 9 Aug 2005 20:17:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Aug 2005 20:17:56 -0000 Received: (qmail 39347 invoked by uid 500); 9 Aug 2005 20:17:44 -0000 Delivered-To: jenny79@example.org Received: (qmail 39218 invoked by uid 500); 9 Aug 2005 20:17:44 -0000 Mailing-List: contact jenny79@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jenny79@example.org> List-Unsubscribe: <mailto:jenny79@example.org> List-Post: <mailto:jenny79@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: jenny79@example.org Delivered-To: mailing list jenny79@example.org Received: (qmail 38762 invoked by uid 99); 9 Aug 2005 20:17:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 13:17:41 -0700 X-ASF-Spam-Status: No, hits=-9.8 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, 09 Aug 2005 13:17:58 -0700 Received: (qmail 99378 invoked by uid 65534); 9 Aug 2005 20:17:34 -0000 Message-ID: <jenny79@example.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r231100 - /lucene/java/trunk/CHANGES.txt Date: Tue, 09 Aug 2005 20:17:34 -0000 To: jenny79@example.org From: jenny79@example.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: dnaber Date: Tue Aug 9 13:17:30 2005 New Revision: 231100 URL: http://svn.apache.org/viewcvs?rev=231100&view=rev Log: use of Lucene in applets Modified: lucene/java/trunk/CHANGES.txt Modified: lucene/java/trunk/CHANGES.txt URL: http://svn.apache.org/viewcvs/lucene/java/trunk/CHANGES.txt?rev=231100&r1=231099&r2=231100&view=diff ============================================================================== --- lucene/java/trunk/CHANGES.txt (original) +++ lucene/java/trunk/CHANGES.txt Tue Aug 9 13:17:30 2005 @@ -138,6 +138,10 @@ worrying about synchronisation/locking issues. (Daniel Naber) +19. Lucene can now be used inside an unsigned applet, as Lucene's access + to system properties will not cause a SecurityException anymore. + (Jon Schuster via Daniel Naber, bug #34359) + API Changes 1. Several methods and fields have been deprecated. The API documentation From java-commitsjenny79@example.org Wed Aug 10 22:39:37 2005 Return-Path: <java-commitsjenny79@example.org> Delivered-To: jenny79@example.org Received: (qmail 6487 invoked from network); 10 Aug 2005 22:39:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 10 Aug 2005 22:39:37 -0000 Received: (qmail 34529 invoked by uid 500); 10 Aug 2005 22:39:37 -0000 Delivered-To: jenny79@example.org Received: (qmail 34506 invoked by uid 500); 10 Aug 2005 22:39:37 -0000 Mailing-List: contact jenny79@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jenny79@example.org> List-Unsubscribe: <mailto:jenny79@example.org> List-Post: <mailto:jenny79@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: jenny79@example.org Delivered-To: mailing list jenny79@example.org Received: (qmail 34493 invoked by uid 99); 10 Aug 2005 22:39:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2005 15:39:36 -0700 X-ASF-Spam-Status: No, hits=-9.8 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; Wed, 10 Aug 2005 15:39:58 -0700 Received: (qmail 6471 invoked by uid 65534); 10 Aug 2005 22:39:35 -0000 Message-ID: <jenny79@example.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r231343 - in /lucene/java/trunk/src: java/org/apache/lucene/index/ParallelReader.java test/org/apache/lucene/index/TestParallelReader.java Date: Wed, 10 Aug 2005 22:39:34 -0000 To: jenny79@example.org From: jenny79@example.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: dnaber Date: Wed Aug 10 15:39:26 2005 New Revision: 231343 URL: http://svn.apache.org/viewcvs?rev=231343&view=rev Log: -make more methods and the exceptions work, adding test cases for these -adding a warning to the javadoc that the user is responsible for keeping the indexes in sync Modified: lucene/java/trunk/src/java/org/apache/lucene/index/ParallelReader.java lucene/java/trunk/src/test/org/apache/lucene/index/TestParallelReader.java Modified: lucene/java/trunk/src/java/org/apache/lucene/index/ParallelReader.java URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/index/ParallelReader.java?rev=231343&r1=231342&r2=231343&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/index/ParallelReader.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/index/ParallelReader.java Wed Aug 10 15:39:26 2005 @@ -16,12 +16,20 @@ * limitations under the License. */ +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.SortedMap; +import java.util.TreeMap; + import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; -import org.apache.lucene.store.Directory; - -import java.io.IOException; -import java.util.*; /** An IndexReader which reads multiple, parallel indexes. Each index added * must have the same number of documents, but typically each contains @@ -33,11 +41,17 @@ * change rarely and small fields that change more frequently. The smaller * fields may be re-indexed in a new index and both indexes may be searched * together. + * + * <p><strong>Warning:</strong> It is up to you to make sure all indexes + * are created and modified the same way. For example, if you add + * documents to one index, you need to add the same documents in the + * same order to the other indexes. <em>Failure to do so will result in + * undefined behavior</em>. */ public class ParallelReader extends IndexReader { - private ArrayList readers = new ArrayList(); + private List readers = new ArrayList(); private SortedMap fieldToReader = new TreeMap(); - private ArrayList storedFieldReaders = new ArrayList(); + private List storedFieldReaders = new ArrayList(); private int maxDoc; private int numDocs; @@ -53,7 +67,13 @@ /** Add an IndexReader whose stored fields will not be returned. This can * accellerate search when stored fields are only needed from a subset of - * the IndexReaders. */ + * the IndexReaders. + * + * @throws IllegalArgumentException if not all indexes contain the same number + * of documents + * @throws IllegalArgumentException if not all indexes have the same value + * of {@link IndexReader#maxDoc()} + */ public void add(IndexReader reader, boolean ignoreStoredFields) throws IOException { @@ -70,7 +90,7 @@ throw new IllegalArgumentException ("All readers must have same numDocs: "+numDocs+"!="+reader.numDocs()); - Iterator i = reader.getFieldNames().iterator(); + Iterator i = reader.getFieldNames(IndexReader.FieldOption.ALL).iterator(); while (i.hasNext()) { // update fieldToReader map String field = (String)i.next(); if (fieldToReader.get(field) == null) @@ -79,9 +99,8 @@ if (!ignoreStoredFields) storedFieldReaders.add(reader); // add to storedFieldReaders - + readers.add(reader); } - public int numDocs() { return numDocs; } Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestParallelReader.java URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/test/org/apache/lucene/index/TestParallelReader.java?rev=231343&r1=231342&r2=231343&view=diff ============================================================================== --- lucene/java/trunk/src/test/org/apache/lucene/index/TestParallelReader.java (original) +++ lucene/java/trunk/src/test/org/apache/lucene/index/TestParallelReader.java Wed Aug 10 15:39:26 2005 @@ -17,6 +17,7 @@ */ import java.io.IOException; +import java.util.Collection; import junit.framework.TestCase; @@ -54,7 +55,42 @@ bq1.add(new TermQuery(new Term("f1", "v1")), Occur.MUST); bq1.add(new TermQuery(new Term("f4", "v1")), Occur.MUST); queryTest(bq1); + } + public void testFieldNames() throws Exception { + Directory dir1 = getDir1(); + Directory dir2 = getDir2(); + ParallelReader pr = new ParallelReader(); + pr.add(IndexReader.open(dir1)); + pr.add(IndexReader.open(dir2)); + Collection fieldNames = pr.getFieldNames(IndexReader.FieldOption.ALL); + assertEquals(4, fieldNames.size()); + assertTrue(fieldNames.contains("f1")); + assertTrue(fieldNames.contains("f2")); + assertTrue(fieldNames.contains("f3")); + assertTrue(fieldNames.contains("f4")); + } + + public void testIncompatibleIndexes() throws IOException { + // two documents: + Directory dir1 = getDir1(); + + // one document only: + Directory dir2 = new RAMDirectory(); + IndexWriter w2 = new IndexWriter(dir2, new StandardAnalyzer(), true); + Document d3 = new Document(); + d3.add(new Field("f3", "v1", Field.Store.YES, Field.Index.TOKENIZED)); + w2.addDocument(d3); + w2.close(); + + ParallelReader pr = new ParallelReader(); + pr.add(IndexReader.open(dir1)); + try { + pr.add(IndexReader.open(dir2)); + fail("didn't get exptected exception: indexes don't have same number of documents"); + } catch (IllegalArgumentException e) { + // expected exception + } } private void queryTest(Query query) throws IOException { @@ -95,6 +131,15 @@ // Fields 1 & 2 in one index, 3 & 4 in other, with ParallelReader: private Searcher parallel() throws IOException { + Directory dir1 = getDir1(); + Directory dir2 = getDir2(); + ParallelReader pr = new ParallelReader(); + pr.add(IndexReader.open(dir1)); + pr.add(IndexReader.open(dir2)); + return new IndexSearcher(pr); + } + + private Directory getDir1() throws IOException { Directory dir1 = new RAMDirectory(); IndexWriter w1 = new IndexWriter(dir1, new StandardAnalyzer(), true); Document d1 = new Document(); @@ -106,7 +151,10 @@ d2.add(new Field("f2", "v2", Field.Store.YES, Field.Index.TOKENIZED)); w1.addDocument(d2); w1.close(); + return dir1; + } + private Directory getDir2() throws IOException { Directory dir2 = new RAMDirectory(); IndexWriter w2 = new IndexWriter(dir2, new StandardAnalyzer(), true); Document d3 = new Document(); @@ -118,11 +166,7 @@ d4.add(new Field("f4", "v2", Field.Store.YES, Field.Index.TOKENIZED)); w2.addDocument(d4); w2.close(); - - ParallelReader pr = new ParallelReader(); - pr.add(IndexReader.open(dir1)); - pr.add(IndexReader.open(dir2)); - - return new IndexSearcher(pr); + return dir2; } + } From java-commitsjenny79@example.org Thu Aug 11 21:28:57 2005 Return-Path: <java-commitsjenny79@example.org> Delivered-To: jenny79@example.org Received: (qmail 47902 invoked from network); 11 Aug 2005 21:28:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 11 Aug 2005 21:28:57 -0000 Received: (qmail 85573 invoked by uid 500); 11 Aug 2005 21:28:56 -0000 Delivered-To: jenny79@example.org Received: (qmail 85553 invoked by uid 500); 11 Aug 2005 21:28:56 -0000 Mailing-List: contact jenny79@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jenny79@example.org> List-Unsubscribe: <mailto:jenny79@example.org> List-Post: <mailto:jenny79@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: jenny79@example.org Delivered-To: mailing list jenny79@example.org Received: (qmail 85540 invoked by uid 99); 11 Aug 2005 21:28:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2005 14:28:56 -0700 X-ASF-Spam-Status: No, hits=-9.8 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, 11 Aug 2005 14:29:18 -0700 Received: (qmail 47893 invoked by uid 65534); 11 Aug 2005 21:28:55 -0000 Message-ID: <jenny79@example.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r231522 - in /lucene/java/trunk/contrib/miscellaneous/src: java/org/apache/lucene/queryParser/analyzing/ test/org/apache/lucene/queryParser/analyzing/ Date: Thu, 11 Aug 2005 21:28:55 -0000 To: jenny79@example.org From: jenny79@example.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: dnaber Date: Thu Aug 11 14:28:47 2005 New Revision: 231522 URL: http://svn.apache.org/viewcvs?rev=231522&view=rev Log: a query parser by Ronnie Kolehmainen that also sends PrefixQuerys etc. through the analyzer Added: lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/ lucene/java/trunk/contrib/miscellaneous/src/test/org/apache/lucene/queryParser/analyzing/ From java-commitsjenny79@example.org Thu Aug 11 21:29:09 2005 Return-Path: <java-commitsjenny79@example.org> Delivered-To: jenny79@example.org Received: (qmail 48047 invoked from network); 11 Aug 2005 21:29:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 11 Aug 2005 21:29:09 -0000 Received: (qmail 85980 invoked by uid 500); 11 Aug 2005 21:29:08 -0000 Delivered-To: jenny79@example.org Received: (qmail 85960 invoked by uid 500); 11 Aug 2005 21:29:08 -0000 Mailing-List: contact jenny79@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jenny79@example.org> List-Unsubscribe: <mailto:jenny79@example.org> List-Post: <mailto:jenny79@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: jenny79@example.org Delivered-To: mailing list jenny79@example.org Received: (qmail 85944 invoked by uid 99); 11 Aug 2005 21:29:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2005 14:29:08 -0700 X-ASF-Spam-Status: No, hits=-9.8 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, 11 Aug 2005 14:29:30 -0700 Received: (qmail 48033 invoked by uid 65534); 11 Aug 2005 21:29:07 -0000 Message-ID: <jenny79@example.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r231523 - in /lucene/java/trunk/contrib/miscellaneous/src: java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java test/org/apache/lucene/queryParser/analyzing/TestAnalyzingQueryParser.java Date: Thu, 11 Aug 2005 21:29:06 -0000 To: jenny79@example.org From: jenny79@example.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: dnaber Date: Thu Aug 11 14:28:58 2005 New Revision: 231523 URL: http://svn.apache.org/viewcvs?rev=231523&view=rev Log: a query parser by Ronnie Kolehmainen that also sends PrefixQuerys etc. through the analyzer Added: lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java lucene/java/trunk/contrib/miscellaneous/src/test/org/apache/lucene/queryParser/analyzing/TestAnalyzingQueryParser.java Added: lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java?rev=231523&view=auto ============================================================================== --- lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java (added) +++ lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java Thu Aug 11 14:28:58 2005 @@ -0,0 +1,314 @@ +package org.apache.lucene.queryParser.analyzing; + +/** + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.io.IOException; +import java.io.StringReader; +import java.util.ArrayList; +import java.util.List; + +import org.apache.lucene.analysis.Analyzer; +import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.queryParser.ParseException; +import org.apache.lucene.search.Query; + +/** + * Overrides Lucene's default QueryParser so that Fuzzy-, Prefix-, Range-, and WildcardQuerys + * are also passed through the given analyzer, but <code>?</code> and <code>*</code> don't get + * removed from the search terms. + * + * <p><b>Warning:</b> This class should only be used with analyzers that do not use stopwords + * or that add tokens. Also, several stemming analyzers are inappropriate: for example, GermanAnalyzer + * will turn <code>H&auml;user</code> into <code>hau</code>, but <code>H?user</code> will + * become <code>h?user</code> when using this parser and thus no match would be found (i.e. + * using this parser will be no improvement over QueryParser in such cases). + * + * @author Ronnie Kolehmainen (jenny79@example.org) + * @version $Revision$, $Date$ + */ +public class AnalyzingQueryParser extends org.apache.lucene.queryParser.QueryParser { + + /** + * Constructs a query parser. + * @param field the default field for query terms. + * @param analyzer used to find terms in the query text. + */ + public AnalyzingQueryParser(String field, Analyzer analyzer) { + super(field, analyzer); + } + + /** + * Called when parser + * parses an input term token that contains one or more wildcard + * characters (? and *), but is not a prefix term token (one + * that has just a single * character at the end) + * <p> + * Depending on analyzer and settings, a wildcard term may (most probably will) + * be lower-cased automatically. It <b>will</b> go through the default Analyzer. + * <p> + * Overrides super class, by passing terms through analyzer. + * + * @param field Name of the field query will use. + * @param termStr Term token that contains one or more wild card + * characters (? or *), but is not simple prefix term + * + * @return Resulting {@link Query} built for the term + * @throws ParseException + */ + protected Query getWildcardQuery(String field, String termStr) throws ParseException { + List tlist = new ArrayList(); + List wlist = new ArrayList(); + /* somewhat a hack: find/store wildcard chars + * in order to put them back after analyzing */ + boolean isWithinToken = (!termStr.startsWith("?") && !termStr.startsWith("*")); + StringBuffer tmpBuffer = new StringBuffer(); + char[] chars = termStr.toCharArray(); + for (int i = 0; i < termStr.length(); i++) { + if (chars[i] == '?' || chars[i] == '*') { + if (isWithinToken) { + tlist.add(tmpBuffer.toString()); + tmpBuffer.setLength(0); + } + isWithinToken = false; + } else { + if (!isWithinToken) { + wlist.add(tmpBuffer.toString()); + tmpBuffer.setLength(0); + } + isWithinToken = true; + } + tmpBuffer.append(chars[i]); + } + if (isWithinToken) { + tlist.add(tmpBuffer.toString()); + } else { + wlist.add(tmpBuffer.toString()); + } + + // get Analyzer from superclass and tokenize the term + TokenStream source = getAnalyzer().tokenStream(field, new StringReader(termStr)); + org.apache.lucene.analysis.Token t; + + int countTokens = 0; + while (true) { + try { + t = source.next(); + } catch (IOException e) { + t = null; + } + if (t == null) { + break; + } + if (!"".equals(t.termText())) { + try { + tlist.set(countTokens++, t.termText()); + } catch (IndexOutOfBoundsException ioobe) { + countTokens = -1; + } + } + } + try { + source.close(); + } catch (IOException e) { + // ignore + } + + if (countTokens != tlist.size()) { + /* this means that the analyzer used either added or consumed + * (common for a stemmer) tokens, and we can't build a WildcardQuery */ + throw new ParseException("Cannot build WildcardQuery with analyzer " + + getAnalyzer().getClass() + " - tokens added or lost"); + } + + if (tlist.size() == 0) { + return null; + } else if (tlist.size() == 1) { + if (wlist != null && wlist.size() == 1) { + /* if wlist contains one wildcard, it must be at the end, because: + * 1) wildcards are not allowed in 1st position of a term by QueryParser + * 2) if wildcard was *not* in end, there would be *two* or more tokens */ + return super.getWildcardQuery(field, (String) tlist.get(0) + + (((String) wlist.get(0)).toString())); + } else { + /* we should never get here! if so, this method was called + * with a termStr containing no wildcard ... */ + throw new IllegalArgumentException("getWildcardQuery called without wildcard"); + } + } else { + /* the term was tokenized, let's rebuild to one token + * with wildcards put back in postion */ + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < tlist.size(); i++) { + sb.append((String) tlist.get(i)); + if (wlist != null && wlist.size() > i) { + sb.append((String) wlist.get(i)); + } + } + return super.getWildcardQuery(field, sb.toString()); + } + } + + /** + * Called when parser parses an input term + * token that uses prefix notation; that is, contains a single '*' wildcard + * character as its last character. Since this is a special case + * of generic wildcard term, and such a query can be optimized easily, + * this usually results in a different query object. + * <p> + * Depending on analyzer and settings, a prefix term may (most probably will) + * be lower-cased automatically. It <b>will</b> go through the default Analyzer. + * <p> + * Overrides super class, by passing terms through analyzer. + * + * @param field Name of the field query will use. + * @param termStr Term token to use for building term for the query + * (<b>without</b> trailing '*' character!) + * + * @return Resulting {@link Query} built for the term + * @throws ParseException + */ + protected Query getPrefixQuery(String field, String termStr) throws ParseException { + // get Analyzer from superclass and tokenize the term + TokenStream source = getAnalyzer().tokenStream(field, new StringReader(termStr)); + List tlist = new ArrayList(); + org.apache.lucene.analysis.Token t; + + while (true) { + try { + t = source.next(); + } catch (IOException e) { + t = null; + } + if (t == null) { + break; + } + tlist.add(t.termText()); + } + + try { + source.close(); + } catch (IOException e) { + // ignore + } + + if (tlist.size() == 1) { + return super.getPrefixQuery(field, (String) tlist.get(0)); + } else { + /* this means that the analyzer used consumed the only token we had, + * and we can't build a PrefixQuery */ + throw new ParseException("Cannot build PrefixQuery with analyzer " + + getAnalyzer().getClass() + " - token was consumed"); + } + } + + /** + * Called when parser parses an input term token that has the fuzzy suffix (~) appended. + * <p> + * Depending on analyzer and settings, a fuzzy term may (most probably will) + * be lower-cased automatically. It <b>will</b> go through the default Analyzer. + * <p> + * Overrides super class, by passing terms through analyzer. + * + * @param field Name of the field query will use. + * @param termStr Term token to use for building term for the query + * + * @return Resulting {@link Query} built for the term + * @exception ParseException + */ + protected Query getFuzzyQuery(String field, String termStr, float minSimilarity) + throws ParseException { + // get Analyzer from superclass and tokenize the term + TokenStream source = getAnalyzer().tokenStream(field, new StringReader(termStr)); + org.apache.lucene.analysis.Token t; + boolean multipleTokens = false; + + try { + t = source.next(); + multipleTokens = source.next() != null; + } catch (IOException e) { + t = null; + } + + try { + source.close(); + } catch (IOException e) { + // ignore + } + + if (multipleTokens) { + throw new ParseException("Cannot build FuzzyQuery with analyzer " + getAnalyzer().getClass() + + " - tokens were added"); + } + + return (t == null) ? null : super.getFuzzyQuery(field, t.termText(), minSimilarity); + } + + /** + * Overrides super class, by passing terms through analyzer. + * @exception ParseException + */ + protected Query getRangeQuery(String field, String part1, String part2, boolean inclusive) + throws ParseException { + // get Analyzer from superclass and tokenize the terms + TokenStream source = getAnalyzer().tokenStream(field, new StringReader(part1)); + org.apache.lucene.analysis.Token t; + boolean multipleTokens = false; + + // part1 + try { + t = source.next(); + if (t != null) { + part1 = t.termText(); + } + multipleTokens = source.next() != null; + } catch (IOException e) { + t = null; + } + try { + source.close(); + } catch (IOException e) { + // ignore + } + if (multipleTokens) { + throw new ParseException("Cannot build RangeQuery with analyzer " + getAnalyzer().getClass() + + " - tokens were added to part1"); + } + + source = getAnalyzer().tokenStream(field, new StringReader(part2)); + // part2 + try { + t = source.next(); + if (t != null) { + part2 = t.termText(); + } + multipleTokens = source.next() != null; + } catch (IOException e) { + t = null; + } + try { + source.close(); + } catch (IOException e) { + // ignore + } + if (multipleTokens) { + throw new ParseException("Cannot build RangeQuery with analyzer " + getAnalyzer().getClass() + + " - tokens were added to part2"); + } + return super.getRangeQuery(field, part1, part2, inclusive); + } + +} Added: lucene/java/trunk/contrib/miscellaneous/src/test/org/apache/lucene/queryParser/analyzing/TestAnalyzingQueryParser.java URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/miscellaneous/src/test/org/apache/lucene/queryParser/analyzing/TestAnalyzingQueryParser.java?rev=231523&view=auto ============================================================================== --- lucene/java/trunk/contrib/miscellaneous/src/test/org/apache/lucene/queryParser/analyzing/TestAnalyzingQueryParser.java (added) +++ lucene/java/trunk/contrib/miscellaneous/src/test/org/apache/lucene/queryParser/analyzing/TestAnalyzingQueryParser.java Thu Aug 11 14:28:58 2005 @@ -0,0 +1,118 @@ +package org.apache.lucene.queryParser.analyzing; + +/** + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.io.Reader; + +import junit.framework.TestCase; + +import org.apache.lucene.analysis.Analyzer; +import org.apache.lucene.analysis.ISOLatin1AccentFilter; +import org.apache.lucene.analysis.LowerCaseFilter; +import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.standard.StandardFilter; +import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.queryParser.ParseException; + +/** + * @author Ronnie Kolehmainen (jenny79@example.org) + * @version $Revision$, $Date$ + */ +public class TestAnalyzingQueryParser extends TestCase { + + private Analyzer a; + + private String[] wildcardInput; + private String[] wildcardExpected; + private String[] prefixInput; + private String[] prefixExpected; + private String[] rangeInput; + private String[] rangeExpected; + private String[] fuzzyInput; + private String[] fuzzyExpected; + + public void setUp() { + wildcardInput = new String[] { "übersetzung über*ung", + "Mötley Cr\u00fce Mötl?* Crü?", "Renée Zellweger Ren?? Zellw?ger" }; + wildcardExpected = new String[] { "ubersetzung uber*ung", "motley crue motl?* cru?", + "renee zellweger ren?? zellw?ger" }; + + prefixInput = new String[] { "übersetzung übersetz*", + "Mötley Crüe Mötl* crü*", "René? Zellw*" }; + prefixExpected = new String[] { "ubersetzung ubersetz*", "motley crue motl* cru*", + "rene? zellw*" }; + + rangeInput = new String[] { "[aa TO bb]", "{Anaïs TO Zoé}" }; + rangeExpected = new String[] { "[aa TO bb]", "{anais TO zoe}" }; + + fuzzyInput = new String[] { "Übersetzung Übersetzung~0.9", + "Mötley Crüe Mötley~0.75 Crüe~0.5", + "Renée Zellweger Renée~0.9 Zellweger~" }; + fuzzyExpected = new String[] { "ubersetzung ubersetzung~0.9", + "motley crue motley~0.75 crue~0.5", "renee zellweger renee~0.9 zellweger~0.5" }; + + a = new ASCIIAnalyzer(); + } + + public void testWildCardQuery() throws ParseException { + for (int i = 0; i < wildcardInput.length; i++) { + assertEquals("Testing wildcards with analyzer " + a.getClass() + ", input string: " + + wildcardInput[i], wildcardExpected[i], parseWithAnalyzingQueryParser(wildcardInput[i], a)); + } + } + + public void testPrefixQuery() throws ParseException { + for (int i = 0; i < prefixInput.length; i++) { + assertEquals("Testing prefixes with analyzer " + a.getClass() + ", input string: " + + prefixInput[i], prefixExpected[i], parseWithAnalyzingQueryParser(prefixInput[i], a)); + } + } + + public void testRangeQuery() throws ParseException { + for (int i = 0; i < rangeInput.length; i++) { + assertEquals("Testing ranges with analyzer " + a.getClass() + ", input string: " + + rangeInput[i], rangeExpected[i], parseWithAnalyzingQueryParser(rangeInput[i], a)); + } + } + + public void testFuzzyQuery() throws ParseException { + for (int i = 0; i < fuzzyInput.length; i++) { + assertEquals("Testing fuzzys with analyzer " + a.getClass() + ", input string: " + + fuzzyInput[i], fuzzyExpected[i], parseWithAnalyzingQueryParser(fuzzyInput[i], a)); + } + } + + private String parseWithAnalyzingQueryParser(String s, Analyzer a) throws ParseException { + AnalyzingQueryParser qp = new AnalyzingQueryParser("field", a); + org.apache.lucene.search.Query q = qp.parse(s); + return q.toString("field"); + } + +} + +class ASCIIAnalyzer extends org.apache.lucene.analysis.Analyzer { + public ASCIIAnalyzer() { + } + + public TokenStream tokenStream(String fieldName, Reader reader) { + TokenStream result = new StandardTokenizer(reader); + result = new StandardFilter(result); + result = new ISOLatin1AccentFilter(result); + result = new LowerCaseFilter(result); + return result; + } +} From java-commitsjenny79@example.org Fri Aug 19 17:45:54 2005 Return-Path: <java-commitsjenny79@example.org> Delivered-To: jenny79@example.org Received: (qmail 61452 invoked from network); 19 Aug 2005 17:45:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 19 Aug 2005 17:45:54 -0000 Received: (qmail 29332 invoked by uid 500); 19 Aug 2005 17:45:54 -0000 Delivered-To: jenny79@example.org Received: (qmail 29321 invoked by uid 500); 19 Aug 2005 17:45:53 -0000 Mailing-List: contact jenny79@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jenny79@example.org> List-Unsubscribe: <mailto:jenny79@example.org> List-Post: <mailto:jenny79@example.org> List-Id: <java-commits.lucene.apache.org> Reply-To: jenny79@example.org Delivered-To: mailing list jenny79@example.org Received: (qmail 29308 invoked by uid 99); 19 Aug 2005 17:45:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Aug 2005 10:45:53 -0700 X-ASF-Spam-Status: No, hits=-9.8 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; Fri, 19 Aug 2005 10:46:11 -0700 Received: (qmail 61433 invoked by uid 65534); 19 Aug 2005 17:45:51 -0000 Message-ID: <jenny79@example.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r233519 - in /lucene/java/trunk: docs/ docs/lucene-sandbox/ xdocs/stylesheets/ Date: Fri, 19 Aug 2005 17:45:48 -0000 To: jenny79@example.org From: jenny79@example.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: dnaber Date: Fri Aug 19 10:45:32 2005 New Revision: 233519 URL: http://svn.apache.org/viewcvs?rev=233519&view=rev Log: removing link to ApacheCon Europe Modified: lucene/java/trunk/docs/benchmarks.html lucene/java/trunk/docs/contributions.html lucene/java/trunk/docs/demo.html lucene/java/trunk/docs/demo2.html lucene/java/trunk/docs/demo3.html lucene/java/trunk/docs/demo4.html lucene/java/trunk/docs/features.html lucene/java/trunk/docs/fileformats.html lucene/java/trunk/docs/gettingstarted.html lucene/java/trunk/docs/index.html lucene/java/trunk/docs/lucene-sandbox/index.html lucene/java/trunk/docs/mailinglists.html lucene/java/trunk/docs/queryparsersyntax.html lucene/java/trunk/docs/resources.html lucene/java/trunk/docs/systemproperties.html lucene/java/trunk/docs/whoweare.html lucene/java/trunk/xdocs/stylesheets/site.vsl Modified: lucene/java/trunk/docs/benchmarks.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/benchmarks.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/benchmarks.html (original) +++ lucene/java/trunk/docs/benchmarks.html Fri Aug 19 10:45:32 2005 @@ -44,9 +44,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/contributions.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/contributions.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/contributions.html (original) +++ lucene/java/trunk/docs/contributions.html Fri Aug 19 10:45:32 2005 @@ -48,9 +48,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/demo.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/demo.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/demo.html (original) +++ lucene/java/trunk/docs/demo.html Fri Aug 19 10:45:32 2005 @@ -44,9 +44,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/demo2.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/demo2.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/demo2.html (original) +++ lucene/java/trunk/docs/demo2.html Fri Aug 19 10:45:32 2005 @@ -44,9 +44,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/demo3.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/demo3.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/demo3.html (original) +++ lucene/java/trunk/docs/demo3.html Fri Aug 19 10:45:32 2005 @@ -44,9 +44,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/demo4.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/demo4.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/demo4.html (original) +++ lucene/java/trunk/docs/demo4.html Fri Aug 19 10:45:32 2005 @@ -44,9 +44,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/features.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/features.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/features.html (original) +++ lucene/java/trunk/docs/features.html Fri Aug 19 10:45:32 2005 @@ -42,9 +42,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/fileformats.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/fileformats.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/fileformats.html (original) +++ lucene/java/trunk/docs/fileformats.html Fri Aug 19 10:45:32 2005 @@ -42,9 +42,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/gettingstarted.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/gettingstarted.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/gettingstarted.html (original) +++ lucene/java/trunk/docs/gettingstarted.html Fri Aug 19 10:45:32 2005 @@ -44,9 +44,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/index.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/index.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/index.html (original) +++ lucene/java/trunk/docs/index.html Fri Aug 19 10:45:32 2005 @@ -50,9 +50,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/lucene-sandbox/index.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/lucene-sandbox/index.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/lucene-sandbox/index.html (original) +++ lucene/java/trunk/docs/lucene-sandbox/index.html Fri Aug 19 10:45:32 2005 @@ -44,9 +44,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="../images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/mailinglists.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/mailinglists.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/mailinglists.html (original) +++ lucene/java/trunk/docs/mailinglists.html Fri Aug 19 10:45:32 2005 @@ -42,9 +42,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/queryparsersyntax.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/queryparsersyntax.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/queryparsersyntax.html (original) +++ lucene/java/trunk/docs/queryparsersyntax.html Fri Aug 19 10:45:32 2005 @@ -46,9 +46,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/resources.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/resources.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/resources.html (original) +++ lucene/java/trunk/docs/resources.html Fri Aug 19 10:45:32 2005 @@ -44,9 +44,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/systemproperties.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/systemproperties.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/systemproperties.html (original) +++ lucene/java/trunk/docs/systemproperties.html Fri Aug 19 10:45:32 2005 @@ -44,9 +44,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/docs/whoweare.html URL: http://svn.apache.org/viewcvs/lucene/java/trunk/docs/whoweare.html?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/docs/whoweare.html (original) +++ lucene/java/trunk/docs/whoweare.html Fri Aug 19 10:45:32 2005 @@ -46,9 +46,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> <a href="http://lucene.apache.org/"><img src="./images/lucene_green_300.gif" alt="Apache Lucene" border="0"/></a> </td> Modified: lucene/java/trunk/xdocs/stylesheets/site.vsl URL: http://svn.apache.org/viewcvs/lucene/java/trunk/xdocs/stylesheets/site.vsl?rev=233519&r1=233518&r2=233519&view=diff ============================================================================== --- lucene/java/trunk/xdocs/stylesheets/site.vsl (original) +++ lucene/java/trunk/xdocs/stylesheets/site.vsl Fri Aug 19 10:45:32 2005 @@ -219,9 +219,6 @@ <td align="left"> <a href="http://www.apache.org"><img src="http://lucene.apache.org/java/docs/images/asf-logo.gif" width="387" height="100" border="0"/></a> </td> -<td align="center"> -<a href="http://apachecon.com"><img src="http://apache.org/images/ac2005eu_135x50.gif"/></a> -</td> <td align="right"> #set ( $logoString = $project.getChild("logo").getAttributeValue("href") ) #if ( $logoString.startsWith("/") ) From java-commitsjenny79@example.org Sun Aug 21 12:23:11 2005 Return-Path: <java-commitsjenny79@example.org> Delivered-To: jenny79@example.org Received: (qmail 33892 invoked from network); 21 Aug 2005 12:23:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 21
{'source': 'Apache Software Foundation Public Mail Archives'}