I am working  on lucene 2.0.0 trying to parse a query with my word "c++" as a
keywords but unfortunately it strips out my word as "c". 

How can I parse a query like "c++" and "c#"?

Here are the codes

import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.search.Query;

class QueryTest {
        public static void main (String [ ] args){
                
                String keywords = "java c++";
                QueryParser qp = new QueryParser("keywords", new 
StandardAnalyzer());
                try {

                     System.err.println("Query - 
"+qp.parse(keywords).toString());              

                }catch (ParseException pe){
                        System.err.println("Error Caught: "+pe);
                }
        }
        
}
-- 
View this message in context: 
http://www.nabble.com/QueryParser-Strips-%22%2B%2B%22-out-of-my-word-%22c%2B%2B%22-tf3125890.html#a8660921
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to