Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 4680 invoked from network); 3 Sep 2004 14:35:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Sep 2004 14:35:10 -0000 Received: (qmail 74341 invoked by uid 500); 3 Sep 2004 14:35:01 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 74251 invoked by uid 500); 3 Sep 2004 14:35:00 -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 74236 invoked by uid 99); 3 Sep 2004 14:35:00 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [205.158.62.107] (HELO ws6-4.us4.outblaze.com) (205.158.62.107) by apache.org (qpsmtpd/0.28) with SMTP; Fri, 03 Sep 2004 07:34:57 -0700 Received: (qmail 25706 invoked from network); 3 Sep 2004 14:34:56 -0000 Received: from unknown (HELO ?192.168.1.102?) (erik@hatcher.net@68.169.41.169) by mta5-2.us4.outblaze.com with SMTP; 3 Sep 2004 14:34:56 -0000 Mime-Version: 1.0 (Apple Message framework v619) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <6ABB1300-FDB6-11D8-9E88-000393A564E6@ehatchersolutions.com> Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: Concatinated search string in not working! Date: Fri, 3 Sep 2004 10:34:52 -0400 To: "Lucene Users List" X-Mailer: Apple Mail (2.619) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N The "Keyword"-ness of a field is only at indexing time, and not something known about at query time. You need to use a different analyzer for that field. Check out posts on KeywordAnalyzer and PerFieldAnalyzerWrapper - this combination is the secret :) Erik On Sep 3, 2004, at 9:55 AM, iouli.golovatyi@group.novartis.com wrote: > > Trying to search by two fields I got nothing. > > The fields where created like: > > String provider =.... > doc.add(Field.Keyword("provider", provider)); > ... > InputStreamReader input = new InputStreamReader( new > ByteArrayInputStream( > contents ) ); > document.add(Field.Text("contents", input )); > > Searching code looks like: > > > ... > public class NeisQueryParser extends QueryParser{ > NeisQueryParser(){ > super("contents", analyzer); // PorterStemAnalyzer is used > } > } > ... > line= "Diovan and provider:NewsEdge"; > > NeisQueryParser nqp=new NeisQueryParser(); > if (and) nqp.setOperator(NeisQueryParser.DEFAULT_OPERATOR_AND); > else nqp.setOperator(NeisQueryParser.DEFAULT_OPERATOR_OR); > Query query = nqp.parse(line); > > hits = ms.search(query, getCurrentTimeFilter()); > > The parsing query comes like > > +contents:diovan +provider:newsedg > > what I realy not undestand, because the "provider" field should not be > tokenized. > > In case the line ="Diovan" I see results. Provider field I see as well > containing "NewsEdge". > > What I do wrong? Please help. > > J. > > > > > --------------------------------------------------------------------- > 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