Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 74433 invoked from network); 6 Sep 2004 14:13:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Sep 2004 14:13:23 -0000 Received: (qmail 85077 invoked by uid 500); 6 Sep 2004 14:13:15 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 85031 invoked by uid 500); 6 Sep 2004 14:13:13 -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 85017 invoked by uid 99); 6 Sep 2004 14:13:13 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [160.62.1.169] (HELO fw-mail12.novartis.com) (160.62.1.169) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 06 Sep 2004 07:13:12 -0700 Received: from mtap1.is.chbs ([192.37.33.20]) by fw-mail12.novartis.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id i86ED84219996820 for ; Mon, 6 Sep 2004 16:13:08 +0200 Received: from phchbs-s3025.EU.novartis.net (phchbs-s3025.eu.novartis.net [192.37.31.249]) by mtap1.is.chbs (Switch-3.1.6/Switch-3.1.0) with ESMTP id i86ED8iJ13205562 for ; Mon, 6 Sep 2004 16:13:08 +0200 Subject: Re: Concatinated search string in not working! To: "Lucene Users List" Message-ID: From: iouli.golovatyi@group.novartis.com Date: Mon, 6 Sep 2004 16:13:07 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks Erik, will try to play with it Erik Hatcher utions.com> cc: Subject: Re: Concatinated search string in not working! 03.09.2004 16:34 Please respond to Category: |-------------------------| "Lucene Users | ( ) Action needed | List" | ( ) Decision needed | | ( ) General Information | |-------------------------| 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( > document.add(Field.Text("contents", input )); > > Searching code looks like: > > > ... > public class NeisQueryParser extends QueryParser{ NeisQueryParser(){ 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 --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org