lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Biswas, Goutam_Kumar" <Goutam-Kumar-Bis...@deshaw.com>
Subject RE: searching woes
Date Wed, 09 Apr 2003 13:18:51 GMT
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" <Goutam-Kumar-Biswas@deshaw.com> 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


Mime
View raw message