lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: QueryParser and escaped characters
Date Tue, 27 Jan 2004 21:23:26 GMT
Your escape character *is* working to pass it through the parser into 
the analyzer.

It is the analyzer that is splitting at the dash.  Phrases get analyzed 
too.

	Erik

p.s. I wish I had a nickel for every Lucene issue that boils down to 
QueryParser or Analyzer misunderstanding.  :)  The two together make 
for some head-scratching fun, that is for sure.

On Jan 27, 2004, at 4:00 PM, DMGoodstein@lbl.gov wrote:

> I'm constructing a query using queryparser as follows:
>
> Query query = QueryParser.parse("ariadne\-1",
>                           "default", new
> StandardAnalyzer());
>
>
> when I print out query.toString(), i get:
>
> default:"ariadne 1"
>
> I'm not sure why my escape of "-" is not working?
>
> --David Goodstein
>
>
>
>
> ---------------------------------------------------------------------
> 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