Return-Path: Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 3888 invoked from network); 22 Sep 2003 00:20:24 -0000 Received: from unknown (HELO hotmail.com) (64.4.27.31) by daedalus.apache.org with SMTP; 22 Sep 2003 00:20:24 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 21 Sep 2003 17:20:32 -0700 Received: from 194.125.178.147 by by8fd.bay8.hotmail.msn.com with HTTP; Mon, 22 Sep 2003 00:20:32 GMT X-Originating-IP: [194.125.178.147] X-Originating-Email: [niall_lennon@hotmail.com] From: "Niall Lennon" To: lucene-user@jakarta.apache.org Bcc: Subject: Re: MultiFieldQueryParser & Phrases Problem Date: Mon, 22 Sep 2003 00:20:32 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 22 Sep 2003 00:20:32.0289 (UTC) FILETIME=[55B9A110:01C3809F] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Cheers for that Erik. >From: Erik Hatcher >Reply-To: "Lucene Users List" >To: "Lucene Users List" >Subject: Re: MultiFieldQueryParser & Phrases Problem >Date: Sun, 21 Sep 2003 18:46:38 -0400 > >StandardAnalyzer removes stop words and "a" is one of them. That is why >you have issues with that phrase. > > Erik > > >On Sunday, September 21, 2003, at 06:13 PM, Niall Lennon wrote: > >>I'm currently using the MultiFieldQueryParser to search across four >>fields. I'm searching for phrases so i've wrapped my search text in >>quotes... everything worked >>fine until i tried to execute a search ending with the 'A' and for some >>reason the A and quotes are ignored e.g.: >> >> >>Analyzer analyzer = new StandardAnalyzer(); >>Searcher searcher = new IndexSearcher(IndexReader.open("dbindex")); >> >>String[] fields = {"code_field", "short_description_field", >>"category_field", "manufacturer_field"}; >>int[] flags = {MultiFieldQueryParser.NORMAL_FIELD, >>MultiFieldQueryParser.NORMAL_FIELD, MultiFieldQueryParser.NORMAL_FIELD, >>MultiFieldQueryParser.NORMAL_FIELD}; >> >>Query query = MultiFieldQueryParser.parse("\"Category A\"", fields, >>flags, analyzer); >> >>System.out.println("query -> " + query); >> >>Hits hits = searcher.search(query); >> >> >> >>The System output for the above is as follows: >>code_field:category short_description_field:category >>category_field:category manufacturer_field:category >> >> >> >>If i execute the same code with the following search text i get the >>expected results: >>Query query = MultiFieldQueryParser.parse("\"Category Z\"", fields, >>flags, analyzer); >> >> >>code_field:"category z" short_description_field:"category z" >>category_field:"category z" manufacturer_field:"category z" >> >> >> >>I' appreicate any help with regards this matter... >> >>_________________________________________________________________ >>The new MSN 8: advanced junk mail protection and 2 months FREE* >>http://join.msn.com/?page=features/junkmail >> >> >>--------------------------------------------------------------------- >>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 > _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail