Hi all,
I've always used the MultiFieldQueryParser class without problems but now i'm experiencing a strange problem.
This is my code:

Map<String, Integer> boost = new HashMap<String, Integer>();
boost.put("field1",5);
boost.put("field2",1);

Analyzer analyzer = new StandardAnalyzer(STOP_WORDS);
String[] s_fields = new String[2];
s_fields[0] = "field1";
s_fields[1] = "field2";
MultiFieldQueryParser mfParser = new MultiFieldQueryParser(s_fields,analyzer,boost);
                
try {
        query = mfParser.parse(query_string);
} catch(Exception ex) {
        System.out.println(ex.getMessage());
}       

If I use a query like:
hi all
I'm getting the error: java.lang.Integer
(quite hard to understand!!)

If I use a query like:
field1:hi field1:all field2:hi field2:all
everything works correctly!!

What I'm missing?
Thanks


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

Reply via email to