lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalani Ruwanpathirana" <kala...@gmail.com>
Subject escaping special characters
Date Mon, 04 Aug 2008 10:05:48 GMT
Hi,

I followed the following procedure to escape special characteres.

String escapedKeywords = QueryParser.escape(keywords);
Query query = new QueryParser("content", new
StandardAnalyzer()).parse(escapedKeywords);

this works with most of the special characters like * and ~ except \ . I
can't do a search for a keyword like "ho\w" and get results.
am I doing anything wrong here.


Thanks,
Kalani
-- 
Kalani Ruwanpathirana
Department of Computer Science & Engineering
University of Moratuwa

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message