From java-user-return-22617-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Thu Aug 10 13:48:30 2006 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 76021 invoked from network); 10 Aug 2006 13:48:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Aug 2006 13:48:30 -0000 Received: (qmail 70678 invoked by uid 500); 10 Aug 2006 13:48:23 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 70653 invoked by uid 500); 10 Aug 2006 13:48:23 -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 70634 invoked by uid 99); 10 Aug 2006 13:48:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2006 06:48:23 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [193.54.76.193] (HELO ron.emn.fr) (193.54.76.193) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2006 06:48:21 -0700 Received: from spip.dsic.emn.fr (root@spip.dsic.emn.fr [193.104.32.156]) by ron.emn.fr (8.9.3/jtpda-5.3.1) with ESMTP id PAA15324 for ; Thu, 10 Aug 2006 15:46:51 +0200 (CEST) Received: from ifs.emn.fr (ifs.emn.fr [193.54.76.100]) by spip.dsic.emn.fr (8.12.1/8.12.1) with ESMTP id k7ADlqbT013874 for ; Thu, 10 Aug 2006 15:47:52 +0200 Received: from [192.168.18.35] (dhcp35.rech18.emn.fr [192.168.18.35]) by ifs.emn.fr (8.9.3/jtpda-5.1) with ESMTP id PAA29943 for ; Thu, 10 Aug 2006 15:46:27 +0200 (MEST) Message-ID: <44DB3905.3000608@emn.fr> Date: Thu, 10 Aug 2006 15:47:49 +0200 From: "ould sid'ahmed" User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: research lucene References: <44D9AADF.2090904@emn.fr> <359a92830608090632m18e7e32ek34f943b71eb46b94@mail.gmail.com> <44D9F131.8@emn.fr> <44D9FED3.1080708@emn.fr> <44DB1C83.5030201@emn.fr> <44DB2544.1020409@emn.fr> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Simon, I have resolved my problem, I added Store.YES and Index.TOKENIZED, and it goes. thank you another time. thanks. Simon Willnauer a écrit : > I just tried it out and it worked like expected: > > > RAMDirectory d = new RAMDirectory(); > IndexWriter w = new IndexWriter(d,new WhitespaceAnalyzer(),true); > > Document doc = new Document(); > doc.add(new > Field("field","title",Field.Store.YES,Field.Index.TOKENIZED )); > doc.add(new > Field("field","2006",Field.Store.YES,Field.Index.TOKENIZED )); > w.addDocument(doc); > > w.close(); > IndexSearcher s = new IndexSearcher(d); > System.out.println("Search for title: "+s.search(new TermQuery(new > Term("field","title"))).length()); > System.out.println("Search for 2006: "+s.search(new TermQuery(new > Term("field","2006"))).length()); > > Output: > > Search for title: 1 > Search for 2006: 1 > > I actually can't really get your problem. > > regards simon > > On 8/10/06, ould sid'ahmed wrote: >> >> The probl add(new Field( fieldName(), fieldValue, Field.Store, >> Field.Index)); >> and I use the WhiteSpaceAnalyser, but my problem is can I index a field >> with value as "title" it goes, and can I index with value as "2006" it >> doesn't go. >> Why, I don't know >> thanks >> Simon Willnauer a écrit : >> > could you provide a bit more info on your index process? >> > (analyzer,Field, Store, Index) >> > >> > regards simon >> > >> > On 8/10/06, ould sid'ahmed wrote: >> >> >> >> Hello, >> >> I don't know why it don't index the number values, I look with Luke >> >> Lucene, I founded that values numerics didn't indexed. >> >> can you know what the problem? >> >> >> >> thanks >> >> Simon Willnauer a écrit : >> >> > Well your digits might be lost during analysis like Erik said. >> Check >> >> > out with luke whats in your index (Field.Store.Yes) and see if your >> >> > analyzer removes the digits. SimpleAnalyzer removes them but >> >> > StandartAnalyzer keeps the digits. >> >> > >> >> > regards simon >> >> > >> >> > On 8/9/06, ould sid'ahmed wrote: >> >> >> Simon Willnauer a écrit : >> >> >> > You should rather explain what you expect from indexing your >> number >> >> >> > not as string values. >> >> >> > >> >> >> > best regards simon >> >> >> > >> >> >> > On 8/9/06, ould sid'ahmed wrote: >> >> >> >> Erick Erickson a écrit : >> >> >> >> > What analyzers are you using for both indexing and searching? >> >> Some >> >> >> >> > analyzers >> >> >> >> > strip out numbers and some don't. I'd start with >> >> >> >> WhitespaceAnalyzer, and >> >> >> >> > index your fields UN_TOKENIZED and work up to the other >> >> analyzers >> >> >> >> and/or >> >> >> >> > tokenizations from there. >> >> >> >> > >> >> >> >> > Under any circumstances, you really, really, really want to >> >> get a >> >> >> >> copy of >> >> >> >> > Luke (http://www.getopt.org/luke/) which will allow you to >> >> examine >> >> >> >> your >> >> >> >> > index to see what it actually contains. I've been >> surprised more >> >> >> than >> >> >> >> > once >> >> >> >> > by thinking that my index contained something it really >> hadn't. >> >> >> >> > >> >> >> >> > Best >> >> >> >> > Erick >> >> >> >> > >> >> >> >> > On 8/9/06, ould sid'ahmed wrote: >> >> >> >> >> >> >> >> >> >> Hello, >> >> >> >> >> >> >> >> >> >> I don't arrive to get result from the field have a value >> >> >> numeric for >> >> >> >> >> example "date=2005" or "title=900", >> >> >> >> >> I have indexed the fields "date" with String value. I >> want know >> >> >> why? >> >> >> >> >> >> >> >> >> >> Can you help me? >> >> >> >> >> >> >> >> >> >> thanks. >> >> >> >> >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> >> >> To unsubscribe, e-mail: >> java-user-unsubscribe@lucene.apache.org >> >> >> >> >> For additional commands, e-mail: >> >> java-user-help@lucene.apache.org >> >> >> >> >> >> >> >> >> >> >> >> >> >> > >> >> >> >> thanks for your response and your soft, >> >> >> >> you think what about the indexer that can resolve my problem. >> >> >> >> my problem is the indexer, it don't index value numeric. >> >> >> >> >> >> >> >> thanks. >> >> >> >> >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> >> >> >> For additional commands, e-mail: >> java-user-help@lucene.apache.org >> >> >> >> >> >> >> >> >> >> >> > >> >> >> I add my document >> >> >> Document doc=new Document(); >> >> >> doc.add(new Field( getName(), value, getStore(), getIndex())); >> >> >> and getName can be "date, name, tilte, or another", but can if I >> >> index >> >> >> title with the value "122" or another, It can't return me a >> >> result, if I >> >> >> index title with "mytitre" for example, it return me the result, I >> >> would >> >> >> like why? >> >> >> >> >> >> thanks. >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> 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 >> >> >> >> >> > >> >> >> --------------------------------------------------------------------- >> 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