Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 62277 invoked from network); 9 Apr 2003 14:47:24 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 9 Apr 2003 14:47:24 -0000 Received: (qmail 26878 invoked by uid 97); 9 Apr 2003 14:49:17 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@nagoya.betaversion.org Received: (qmail 26871 invoked from network); 9 Apr 2003 14:49:17 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 9 Apr 2003 14:49:17 -0000 Received: (qmail 61989 invoked by uid 500); 9 Apr 2003 14:47:21 -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 61978 invoked from network); 9 Apr 2003 14:47:21 -0000 Received: from web12705.mail.yahoo.com (216.136.173.242) by daedalus.apache.org with SMTP; 9 Apr 2003 14:47:21 -0000 Message-ID: <20030409144723.59157.qmail@web12705.mail.yahoo.com> Received: from [216.194.17.194] by web12705.mail.yahoo.com via HTTP; Wed, 09 Apr 2003 07:47:23 PDT Date: Wed, 9 Apr 2003 07:47:23 -0700 (PDT) From: Otis Gospodnetic Subject: RE: searching woes To: Lucene Users List In-Reply-To: <7B4F465444F8D51184B500065B3817508A9AB3@mshyd1.hyd.deshaw.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N You should be able to escape it using \, but note that you will have to use an Analyzer that does not discard \ characters. Take a look at some unit tests for the escape character to see how it works. Otis --- "Biswas, Goutam_Kumar" wrote: > Otis, > > you are right. The QueryParser is treating '-' as a boolean NOT > operator. I > was wondering whether I should encode the - character while indexing > and > then apply the same encoding while searching. While I'll be working > on this, > is there any better way to do this? (Apart from writing my own > QueryParser > that is :-) ) > > +goutam > > -----Original Message----- > From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com] > Sent: Tuesday, April 08, 2003 11:51 PM > To: Lucene Users List > Subject: Re: searching woes > > > Most likely you are using QueryParser, which considers - to be a > special character. You could make a custom QueryParser that treats - > like any other character, but you would use some other nice things, > like range searches. Maybe it's a conflict with the '-' that is used > as NOT operator. > > Otis > > --- "Biswas, Goutam_Kumar" wrote: > > Hi, > > > > I have written a search engine for our intranet. I'm storing the > file > > path > > as a KEYWORD field. > > > > While searching if I want to restrict my search results to a > > particular file > > path I'd use a query like path:/proj/cadessa/*. However if the file > > path > > contains a hyphen '-' I'm not getting any results. For example if I > > have a > > file like /proj/cadessa/cadessa-externa/apache/lucene/README.txt > and > > I use > > a query like path:/proj/cadessa/cadessa-external*. I do get the > > correct > > results, however, if I use a query like > path:/proj/cadessa/cadessa*. > > > > So I guess the '-' is the culprit here. Has any one of you faced a > > similar > > problem before ? > > > > can any one please suggest how I should work around this problem ? > > > > Thanks in advance, > > +Goutam > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: > lucene-user-help@jakarta.apache.org > > > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Tax Center - File online, calculators, forms, and more > http://tax.yahoo.com > > --------------------------------------------------------------------- > 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 > __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org