Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 50719 invoked from network); 5 Dec 2003 20:34:50 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 5 Dec 2003 20:34:50 -0000 Received: (qmail 95138 invoked by uid 500); 5 Dec 2003 20:34:35 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 95112 invoked by uid 500); 5 Dec 2003 20:34:34 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 95098 invoked from network); 5 Dec 2003 20:34:34 -0000 Received: from unknown (HELO mailgw3a.lmco.com) (192.35.35.7) by daedalus.apache.org with SMTP; 5 Dec 2003 20:34:34 -0000 Received: from emss04g01.ems.lmco.com ([166.17.13.122]) by mailgw3a.lmco.com (8.11.6p2/8.11.6) with ESMTP id hB5KYdI06414 for ; Fri, 5 Dec 2003 15:34:39 -0500 (EST) Received: from CONVERSION-DAEMON.lmco.com by lmco.com (PMDF V6.1-1X6 #30760) id <0HPF00901VTRMI@lmco.com> for lucene-user@jakarta.apache.org; Fri, 05 Dec 2003 15:34:39 -0500 (EST) Received: from EMSS04I00.us.lmco.com ([166.17.13.135]) by lmco.com (PMDF V6.1-1X6 #30760) with ESMTP id <0HPF00H1DVTRL8@lmco.com> for lucene-user@jakarta.apache.org; Fri, 05 Dec 2003 15:34:39 -0500 (EST) Received: from EMSS04M14.us.lmco.com ([162.16.20.50]) by EMSS04I00.us.lmco.com with Microsoft SMTPSVC(5.0.2195.2966); Fri, 05 Dec 2003 15:34:39 -0500 Date: Fri, 05 Dec 2003 15:34:38 -0500 From: "Pleasant, Tracy" Subject: RE: Returning one result To: Lucene Users List Message-id: <1B76D3F17F4BE44283AD3C1C92AB590B01D1E7A1@EMSS04M14.us.lmco.com> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft Exchange V6.0.6375.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Thread-Topic: Returning one result Thread-Index: AcO7bxrUZWj0M2KkRXuNgEfoIvuzzgAAApQw content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: X-OriginalArrivalTime: 05 Dec 2003 20:34:39.0171 (UTC) FILETIME=[346B3130:01C3BB6F] 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 Yes it is in the list of arrays that I want searched. -----Original Message----- From: Dror Matalon [mailto:dror@zapatec.com] Sent: Friday, December 05, 2003 3:32 PM To: Lucene Users List Subject: Re: Returning one result On Fri, Dec 05, 2003 at 03:14:08PM -0500, Pleasant, Tracy wrote: > What do you mean 'add' in MultiFieldQueryParser? I am using all the > fields Sorry, that was wrong. What I meant to say is are you adding the field to the array of fields that need to be searched? You need to use a MultiFieldQueryParser and pass it the array of fields that you want searched. Dror > > When I index it does > > add (Field.Keyword(..,..)) > > > But I don't want the user to have to type ID: It would be > nice to just type ID Number. On your site if you just put: 11183 in the > search box there are no results. > > well, right now I'll just do it as text and query that field for the id > # to display the document. It can't hurt, right? :) Unless the Keyword > is a better way > > > > -----Original Message----- > From: Dror Matalon [mailto:dror@zapatec.com] > Sent: Friday, December 05, 2003 3:06 PM > To: Lucene Users List > Subject: Re: Returning one result > > > On Fri, Dec 05, 2003 at 02:45:34PM -0500, Pleasant, Tracy wrote: > > Maybe we are having some communication issues. > > > > At any rate, I did index it as a KEYWORD and when displaying used the > > TermQuery. > > > > The only problem with this though is by storing the ID (i.e. AR345) as > a > > Keyword, if I search for AR345 no results are returned when I use the > > MultiFieldQueryParser . > > > > *sigh* *arg* > > OK. > > Go to http://www.fastbuzz.com/search/index.jsp and type "lucene" without > the quotes and hit search. You get results from different channels/rss > feeds. > > Now type "lucene channel:11183" without the quotes and hit search. You > get results only from Java-Channel. > > We're inserting the field channel as a keyword, and it does what I > understand you want to use AR345. > > I would guess that in MultiFieldQueryParser you are not doing an add() > of the field for AR345 which is why the search fails. > > Regards, > > Dror > > > > > > > > > > -----Original Message----- > > From: Erik Hatcher [mailto:erik@ehatchersolutions.com] > > Sent: Friday, December 05, 2003 2:13 PM > > To: Lucene Users List > > Subject: Re: Returning one result > > > > > > On Friday, December 5, 2003, at 01:25 PM, Pleasant, Tracy wrote: > > > Say ID is Ar3453 .. well the user may want to search for Ar3453, so > in > > > order for it to be searchable then it would have to be indexed and > not > > > > > a > > > keyword. > > > > *arg* - we're having a serious communication issue here. My advice to > > > you is to actually write some simple tests (test-driven learning using > > > JUnit is a wonderful way to experiement with Lucene, especially thanks > > > to the RAMDirectory). Please refer to my articles at java.net as well > > > as the other great Lucene articles out there. > > > > Let me try again.... a Field.Keyword *IS* indexed! Even Lucene's > > javadocs say this for this method: > > > > /** Constructs a String-valued Field that is not tokenized, but is > > >>>indexed<<< > > and stored. Useful for non-text fields, e.g. date or url. */ > > > > [I added the emphasis there] > > > > > > > So after using > > > TermQuery query = new TermQuery(new Term("id", term)); > > > > > > How would I return the other fields in the document? > > > > > > For instance to display a record it would get the record with the id > # > > > and then display the title, contents, etc. > > > > Umm.... you'd use *exactly* the same way as if you had used > > QueryParser. QueryParser would create a TermQuery for you, in fact, > > except it would analyze your text first, which is what you want to > > avoid, right? > > > > Hits.doc(n) gives you back a Document. And then > > Document.get("fieldName") gives you back the fields (as long as you > >>> > > stored <<< them in the index too). > > > > Again, please attempt some of these things in code. It is a trivial > > matter to index and search using RAMDirectory and experiment with > > TermQuery, QueryParser, Analyzers, etc. > > > > Erik > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > > > > -- > Dror Matalon > Zapatec Inc > 1700 MLK Way > Berkeley, CA 94709 > http://www.fastbuzz.com > http://www.zapatec.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > -- Dror Matalon Zapatec Inc 1700 MLK Way Berkeley, CA 94709 http://www.fastbuzz.com http://www.zapatec.com --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org