Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 94287 invoked from network); 28 Jan 2004 04:37:24 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 28 Jan 2004 04:37:24 -0000 Received: (qmail 60832 invoked by uid 500); 28 Jan 2004 04:36:53 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 60800 invoked by uid 500); 28 Jan 2004 04:36:53 -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 60637 invoked from network); 28 Jan 2004 04:36:52 -0000 Received: from unknown (HELO incze.adsl.enternet.hu) (62.112.223.117) by daedalus.apache.org with SMTP; 28 Jan 2004 04:36:52 -0000 Received: from g40.incze.hu (g40.incze.hu [192.168.10.18]) by incze.adsl.enternet.hu (8.11.6/8.11.6) with ESMTP id i0S4auc17374 for ; Wed, 28 Jan 2004 05:36:56 +0100 Received: from g40.incze.hu (localhost.localdomain [127.0.0.1]) by g40.incze.hu (8.12.10/8.12.10) with ESMTP id i0S4auqb018120 for ; Wed, 28 Jan 2004 05:36:56 +0100 Received: (from incze@localhost) by g40.incze.hu (8.12.10/8.12.8/Submit) id i0S4auqc018111 for lucene-user@jakarta.apache.org; Wed, 28 Jan 2004 05:36:56 +0100 X-Authentication-Warning: g40.incze.hu: incze set sender to incze@mail.matav.hu using -f Date: Wed, 28 Jan 2004 05:36:56 +0100 From: Incze Lajos To: Lucene Users List Subject: Re: QueryParser and escaped characters Message-ID: <20040128043656.GB19402@incze.adsl.enternet.hu> References: <2747f6275d56.275d562747f6@lbl.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2747f6275d56.275d562747f6@lbl.gov> User-Agent: Mutt/1.4.1i 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 [...] > so if i *don't* escape the "-", the standard > analyzer *doesn't* split at the dash..isn't that > opposite the expected behavior? > > --David Yes, it is. If you study the standard tokenizer grammar, the dash is allowed inthe NUM, ALPHANUM token type and your is an ALPHANUM. So, it's OK. When you escape the dash from the QueryParser, you insert a character which breaks the token for the analyzer. If you want to use this analyzer to have the token types and patterns it provides (and you badly need the dash in alphanums) don't use the query parser, build the queries by the APIs. incze --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org