lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Rondanini <l...@translated.net>
Subject strange MultiFieldQueryParser error: java.lang.Integer
Date Fri, 03 Aug 2007 14:09:28 GMT
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message