lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <>
Subject Re: QueryParser question
Date Mon, 30 Dec 2002 16:59:31 GMT
You could write an Analyzer that doesn't drop '/' character and use an
instance of that Analzyer when you call QueryParser.parse method.
I never used escape characters myself, and saw a lot of people
complaining it does not work, however, you can check Lucene's
QueryParser test class (in CVS under src/test or some place like that)
which includes tests for escape chars.  From what I remember they use a
different Analyzer (WhitespaceAnalyzer?  Maybe you can try that one
before writing your own).


--- Erik Hatcher <> wrote:
> I have a keyword field that has a value like: "/path/to/something".
> Is 
> there a way I can use QueryParser to get documents that have that
> field 
> value?  It seems the Analyzer is kicking in and tokenizing it if I 
> query for "path:/path/to/something".  I tried several ways of
> escaping 
> the slashes and quotes, but nothing seemed to work.  Help!
> Yes, I know I can do it by constructing a query through the API and 
> that works fine - but it'd be nicer, of course, if QueryParser did
> the 
> trick.
> Thanks,
> 	Erik
> --
> To unsubscribe, e-mail:  
> <>
> For additional commands, e-mail:
> <>

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message