Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@www.apache.org Received: (qmail 75492 invoked from network); 21 Jan 2004 20:56:17 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 21 Jan 2004 20:56:17 -0000 Received: (qmail 53620 invoked by uid 500); 21 Jan 2004 20:56:04 -0000 Delivered-To: apmail-jakarta-lucene-dev-archive@jakarta.apache.org Received: (qmail 53604 invoked by uid 500); 21 Jan 2004 20:56:04 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 53577 invoked from network); 21 Jan 2004 20:56:03 -0000 Received: from unknown (HELO sccrmhc11.comcast.net) (204.127.202.55) by daedalus.apache.org with SMTP; 21 Jan 2004 20:56:03 -0000 Received: from apache.org (c-24-5-145-151.client.comcast.net[24.5.145.151]) by comcast.net (sccrmhc11) with SMTP id <2004012120560801100r2ihpe>; Wed, 21 Jan 2004 20:56:08 +0000 Message-ID: <400EE765.7000207@apache.org> Date: Wed, 21 Jan 2004 12:56:05 -0800 From: Doug Cutting User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lucene Developers List Subject: Re: RE : RE : Test issue with new version of .tis file References: <006101c3e05d$b26f12f0$d1e04251@KAK> In-Reply-To: <006101c3e05d$b26f12f0$d1e04251@KAK> Content-Type: multipart/mixed; boundary="------------030803080203080905000403" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --------------030803080203080905000403 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I am unable to reproduce this with your test code. It works fine for me. What JVM and OS are you using? I tried Sun's 1.4.2 on Linux and 1.4.1 on Windows XP. I had to modify a few things to get your code to work. Some long lines were wrapped, and the index path was absolute. I attached the version I ran (we'll see if the attachment makes it). Doug --------------030803080203080905000403 Content-Type: text/x-java; name="Test.java" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Test.java" import java.io.File; import java.io.IOException; import java.util.Random; import org.apache.lucene.analysis.WhitespaceAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexWriter; /** * @author Julien GERARD * @version 1.0, 21 janv. 04 */ public class Test { private static char[] char_table = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}; private static final Random RANDOM = new Random(); /** * Random method * @param i the max range value * @return the random number generated */ private static int random(int i) { int r = RANDOM.nextInt(); if (r < 0) r = -r; return r % i; } /** * No args needed */ public static void main(String[] args) { int nb_doc = 1000; try { IndexWriter iw = new IndexWriter(new File("index"), new WhitespaceAnalyzer(), true); for (int i = 0 ; i < nb_doc ; i++) { // Doc loop // iw.optimize(); int nb_words = random(4)+1; StringBuffer word_list = new StringBuffer(50); for ( int j = 0 ; j < nb_words ; j++ ) { // Word loop int nb_letters = random(12)+1; StringBuffer word = new StringBuffer(13); for ( int k = 0; k < nb_letters; k++ ) { // Letters loop word.append(char_table[random(char_table.length-1)]); } word_list.append(word).append(' '); } Document doc = new Document(); doc.add(Field.Text("TOKEN", word_list.toString())); StringBuffer word = new StringBuffer(13); int nb_letters = random(12)+1; for ( int k = 0; k < nb_letters ; k++ ) { // Letters loop word.append(char_table[random(char_table.length-1)]); } doc.add(Field.Keyword("FIELD_DISCRIMINATOR", word.toString())); StringBuffer word2 = new StringBuffer(13); nb_letters = random(12)+1; for ( int k = 0; k < nb_letters ; k++ ) { // Letters loop word2.append(char_table[random(char_table.length-1)]); } doc.add(Field.Keyword("FIELD_DISCRIMINATOR2", word2.toString())); iw.addDocument(doc); } iw.optimize(); } catch (IOException ioe ) { ioe.printStackTrace(); } } } --------------030803080203080905000403 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-dev-help@jakarta.apache.org --------------030803080203080905000403--