Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 22094 invoked from network); 10 May 2006 04:16:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 May 2006 04:16:18 -0000 Received: (qmail 60902 invoked by uid 500); 10 May 2006 04:16:12 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 60830 invoked by uid 500); 10 May 2006 04:16:12 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 60816 invoked by uid 99); 10 May 2006 04:16:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 May 2006 21:16:12 -0700 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS,FORGED_YAHOO_RCVD X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [206.190.38.62] (HELO web50308.mail.yahoo.com) (206.190.38.62) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 09 May 2006 21:16:10 -0700 Received: (qmail 95714 invoked by uid 60001); 10 May 2006 04:15:49 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=oRcgbFn04xI2odIUmsyeZzEAXE2kDWcHj4LXwgjxeOjFg0yTwXtWNVFzVXv1M6yzrMHt7+YtCt9BciEbRbuhwUTqFVXcWtQFEvqwVuNEVICcjPbwnRzC1X9ac2aArmidNvyNaQxisU/Oa5F1ljT46Lz01FutEEKPp4VhioeS4iw= ; Message-ID: <20060510041549.95712.qmail@web50308.mail.yahoo.com> Date: Tue, 9 May 2006 21:15:49 -0700 (PDT) From: Otis Gospodnetic Reply-To: Otis Gospodnetic Subject: Re: Lucene query question To: java-user@lucene.apache.org In-Reply-To: <931ca11b0605091918r393f6992l985add55537fcf09@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Mike, Do you really want to tokenize your emails? StandardAnalyzer may in fact recognize email addresses and leave them as one token, but it would probably be better practice to make that email field UN_TOKENIZED. Most of the time when people have trouble finding a Document they _know_ is in the index, the problem involves Analyzers, and sometimes the QueryParser+Analyzer combination. Grab Lucene in Action code and run the app that will take your input and pass it through various Analyzers to get an idea what's happening with your test field. Otis ----- Original Message ---- From: Mike Richmond To: java-user@lucene.apache.org Sent: Tuesday, May 9, 2006 10:18:29 PM Subject: Lucene query question I am new to Lucene, but the behavior that I am seeing does not seem to make sense to me. I am using the latest version of Lucene (1.9.1) and executing the following code below which creates an index with a single document and only one field (named "test") with a value of "richmondmike@gmail.com". If I use Luke to search through this newly created index using a query such as: "test:richmondmike@gmail.com" I do not get any matches. However, if using Luke I browse to the document and click the "Reconstruct & Edit" button then without making any changes save the document I can then rerun the same query and it will find the document! Is this normal? The only thing I can think of is that the index was created with Lucene 1.9.1 and is being searched using Luke (which was probably written using an older version of Lucene). Any help would be greatly appreciated. Thanks in advance, Mike -------------------CODE SNIPPET BELOW----------------- IndexWriter iw = new IndexWriter("index", new StandardAnalyzer(), true); Document d = new Document(); d.add( new Field("test", "richmondmike@gmail.com", Field.Store.YES, Field.Index.TOKENIZED)); iw.addDocument( d ); iw.close(); --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org