Re: Handling + as a special character in Lucene search

2009-10-23 Thread mitu2009
Code details: When I execute this line,I get a blank search query. queryField = multiFieldQueryParser.Parse(inpKeywords);keywordsQuery.Add(queryField, BooleanClause.Occur.SHOULD);And here is my custom analyzer: public class CustomAnalyzer : Analyzer{private static readonly Whitespace

Re: Handling + as a special character in Lucene search

2009-10-22 Thread Koji Sekiguchi
Or you can use MappingCharFilter if you are using Lucene 2.9. You can convert "c++" into "cplusplus" prior to running Tokenizer. Koji -- http://www.rondhuit.com/en/ Ian Lea wrote: You need to make sure that these terms are getting indexed, by using an analyzer that won't drop them and using

Re: Handling + as a special character in Lucene search

2009-10-22 Thread Ian Lea
You need to make sure that these terms are getting indexed, by using an analyzer that won't drop them and using Luke to check. Then, if you are using QueryParser, you'll need to escape the special characters e.g. c\+\+. See http://lucene.apache.org/java/2_9_0/queryparsersyntax.html#Escaping%20Spe

Handling + as a special character in Lucene search

2009-10-21 Thread mitu2009
Hi, How do i make sure lucene gives me back relevant search results when my input string contains terms like c++? Lucene seems to ignore ++ characters. Thanks -- View this message in context: http://www.nabble.com/Handling-%2B-as-a-special-character-in-Lucene-search-tp26002815p26002815.html S