Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 59183 invoked from network); 25 Sep 2006 21:18:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Sep 2006 21:18:19 -0000 Received: (qmail 25157 invoked by uid 500); 25 Sep 2006 21:18:17 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 24918 invoked by uid 500); 25 Sep 2006 21:18:16 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 24903 invoked by uid 99); 25 Sep 2006 21:18:16 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Sep 2006 14:18:15 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=lists@nabble.com; spf=pass X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received-SPF: pass (idunn.apache.osuosl.org: domain nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] ([72.21.53.35:43052] helo=talk.nabble.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 16/F1-13750-39748154 for ; Mon, 25 Sep 2006 14:18:12 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GRxps-0005pH-Jt for java-dev@lucene.apache.org; Mon, 25 Sep 2006 14:17:56 -0700 Message-ID: <6495702.post@talk.nabble.com> Date: Mon, 25 Sep 2006 14:17:56 -0700 (PDT) From: djd0383 To: java-dev@lucene.apache.org Subject: Re: Searching with "1" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: ddigmann@formos.com References: <6456507.post@talk.nabble.com> <6456825.post@talk.nabble.com> <6457067.post@talk.nabble.com> <6491379.post@talk.nabble.com> <6492358.post@talk.nabble.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N What are the Store and Index classes? It does not seem that my version of Lucene is using them.... Doron Cohen wrote: > > djd0383 wrote on 25/09/2006 11:21:13: >> Those two message print the following: >> For qtxt 1* the result query is allText:1* and >> The analyzer in use is: >> org.apache.lucene.analysis.standard.StandardAnalyzer > > This output seems ok - the analyzer is standard and seems to me the result > query should be working. Are you able to modify this small stand-alone > program to create the exception you are seeing? > > public static void main(String[] args) throws Exception { > // populate index with 2 docs > RAMDirectory dir = new RAMDirectory(); > Analyzer anlzr = new StandardAnalyzer(); > IndexWriter iw = new IndexWriter(dir,anlzr,true); > String fldName = "allText"; > Document d1 = new Document(); > d1.add(new Field(fldName,"This doc has no ones in > it.",Store.NO,Index.TOKENIZED)); > iw.addDocument(d1); > Document d2 = new Document(); > d2.add(new Field(fldName,"This doc has: > 123.",Store.NO,Index.TOKENIZED)); > iw.addDocument(d2); > iw.close(); > > String qtxt = "1*"; > QueryParser qp = new QueryParser(fldName, anlzr); > Query query = qp.parse(qtxt); > System.out.println("For qtxt "+qtxt+" the result query is: " + query); > System.out.println("Analyzer: "+anlzr); > > IndexSearcher searcher = new IndexSearcher(dir); > Hits hits = searcher.search(query); > if (hits==null || hits.length()==0) { > System.out.println(" NO results."); > } else { > System.out.println(" RESULTS:"); > for (int i = 0; i < hits.length(); i++) { > System.out.println(" "+hits.id(i)+" - "+hits.score(i)); > } > } > > } > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org > > > -- View this message in context: http://www.nabble.com/Searching-with-%221%22-tf2320552.html#a6495702 Sent from the Lucene - Java Developer mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org