Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 43751 invoked from network); 16 Oct 2006 08:25:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Oct 2006 08:25:33 -0000 Received: (qmail 55126 invoked by uid 500); 16 Oct 2006 08:25:26 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 55098 invoked by uid 500); 16 Oct 2006 08:25:26 -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 55086 invoked by uid 99); 16 Oct 2006 08:25:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2006 01:25:26 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [69.55.225.129] (HELO ehatchersolutions.com) (69.55.225.129) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2006 01:25:25 -0700 Received: by ehatchersolutions.com (Postfix, from userid 504) id 9391230EFC16; Mon, 16 Oct 2006 04:25:04 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on javelina X-Spam-Level: Received: from [10.0.1.2] (va-71-53-203-135.dhcp.embarqhsd.net [71.53.203.135]) by ehatchersolutions.com (Postfix) with ESMTP id 8F6E130EFC16 for ; Mon, 16 Oct 2006 04:25:00 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <45332A6A.50602@teamware.com> References: <45332A6A.50602@teamware.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <6DCBC109-7B4F-4836-88D7-28454D9E05BF@ehatchersolutions.com> Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: Query not finding indexed data Date: Mon, 16 Oct 2006 04:24:57 -0400 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00, RCVD_IN_SORBS_DUL autolearn=no version=3.1.1 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Oct 16, 2006, at 2:44 AM, Antony Bowesman wrote: > Doron Cohen wrote: >> Hi Antony, you cannot instruct the query parser to do that. Note >> that an > > Thanks, I suspected as much. I've changed it to make the field > tokenized. > >> field name. This is an application logic to know that a certain >> query is >> not to be tokenized. In this case you could create your query with: >> query = new TermQuery(fieldName, "IqTstAdminGuide2.pdf"); > > The query is user driven, so I can't know without parsing whether > it should be tokenised or not. I would have to extend the parser > to make use of TermQuery - it's easier just to tokenize the field > now I understand Lucene's behaviour. You can also use PerFieldAnalyzerWrapper as the analyzer for QueryParser, and for all your untokenized fields, specify a KeywordAnalyzer. That will keep untokenized fields from being split (as best it can given QueryParser meta-syntax). Erik --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org