Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 25655 invoked from network); 1 Jun 2006 04:34:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Jun 2006 04:34:40 -0000 Received: (qmail 13183 invoked by uid 500); 1 Jun 2006 04:34:34 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 13146 invoked by uid 500); 1 Jun 2006 04:34:34 -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 13134 invoked by uid 99); 1 Jun 2006 04:34:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 May 2006 21:34:33 -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.58] (HELO web50304.mail.yahoo.com) (206.190.38.58) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 31 May 2006 21:34:32 -0700 Received: (qmail 56066 invoked by uid 60001); 1 Jun 2006 04:34:11 -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=ufLVT4rtSSyq+beNU2jykyvOOhnTTU+IqwSrbRSfBONlbtznnxeE/U57anpNp9h45PEO3sQ48ZeBIDcS3ypprPD89TeG76n0PWjUCyOYmg2Izg80zkvs7Six1rMMhHRFxrYyMr8s76zAG61wmi/fsULU8scK/h3vs5FcoVJQ15c= ; Message-ID: <20060601043411.56064.qmail@web50304.mail.yahoo.com> Date: Wed, 31 May 2006 21:34:11 -0700 (PDT) From: Otis Gospodnetic Reply-To: Otis Gospodnetic Subject: Re: how to craete index with particular ID To: java-user@lucene.apache.org In-Reply-To: <934F531A825AFF4F863658E2402E0647076E5460@ho-kkj-msg3.in.niit.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 Here's an example that will work with the query parser: title:FAQ Otis ----- Original Message ---- From: Amaresh Kumar Yadav To: "java-user@lucene.apache.org" Sent: Wednesday, May 31, 2006 11:56:19 PM Subject: RE: how to craete index with particular ID i want to search for text into "title" field only. how shuold i specify it? Regards.. Amaresh -----Original Message----- From: Alexey Sorokin [mailto:alsor.net@gmail.com] Sent: Wednesday, May 31, 2006 4:21 PM To: java-user@lucene.apache.org Subject: Re: how to craete index with particular ID Actually you don't need to create text file. Get data from db and create Document that put in index. At least you must store ID of row in Document. Or you may store doctitle and docpath too. For each row you shoul do something like this: import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; Document doc = new Document(); doc.add(new Field("ID", [here you row ID value], Field.Store.YES, Field.Index.UN_TOKENIZED)); doc.add(new Field("TITLE", [here value of doctitle field], Field.Store.NO, Field.Index.TOKENIZED)); doc.add(new Field("PATH", [here value of docpath field], Field.Store.NO, Field.Index.TOKENIZED)); indexWriter.addDocument(doc); After searcing you have Hits, get doc from Hits and get value of "ID" field of that doc - now you may get row from table by ID and receive any data. 2006/5/31, Amaresh Kumar Yadav : > Hi All, > > Infact i want to search data which is stored in a table on oracle... > > my table contains two fields "doctitle" and "docpath", first field(doctitle) > represents location of some document and second field(docpath)represents > documents title. > > I want to apply lucene search on doctitle. > > What i want to do for search ... > > First create a text file which contains data(that is retrived by oracle > query) which is stored in table. > > Now i want to creat index for this file. > > now i want to search on title of document which is stored in the text file. > > after searching i want to disply corresponding path from index file. > > How should i creat such index file ??? > > how should i proceed???? > > > With Thanks & Regards > > Amaresh > > ---------------------------------------------------------------------- > DISCLAIMER > > This email and any files transmitted with it are confidential and are solely for the use of the individual or entity to which it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you receive this transmission in error, please notify the sender by reply email and then destroy the message. Opinions, conclusions and other information in this message that do not relate to official business of the company shall be understood to be neither given nor endorsed by NIIT Ltd. or NIIT Technologies Ltd. Any information contained in this email, when addressed to Clients is subject to the terms and conditions in governing client contract. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > -- ICQ: 166072598 --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org ---------------------------------------------------------------------- DISCLAIMER This email and any files transmitted with it are confidential and are solely for the use of the individual or entity to which it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you receive this transmission in error, please notify the sender by reply email and then destroy the message. Opinions, conclusions and other information in this message that do not relate to official business of the company shall be understood to be neither given nor endorsed by NIIT Ltd. or NIIT Technologies Ltd. Any information contained in this email, when addressed to Clients is subject to the terms and conditions in governing client contract. --------------------------------------------------------------------- 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