can i escape built in lucene keywords like OR, AND aswell? Regards, Aravind R Yarram
Chris Hostetter <[EMAIL PROTECTED]> 08/06/2008 07:05 PM Please respond to java-user@lucene.apache.org To java-user@lucene.apache.org cc Subject Re: escaping special characters : 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. QueryParser.escape will in fact escape a backslash, but keep in mind StandardAnalyzer splits on backslash so that may be what's confusing you. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message contains information from Equifax Inc. which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify by e-mail [EMAIL PROTECTED]