The parameter values added to a CustomScoreQueryBuilder by
using .param(java.lang.String key, java.lang.Object value) end up being
Strings when retrieved in an implementation of, for example,
AbstractDoubleSearchScript. Somewhere the values are cast to
java.lang.String, but I couldn't find where. Is this behavior expected?
The parameter values added to a CustomScoreQueryBuilder by
using .param(java.lang.String key, java.lang.Object value) end up being
Strings when retrieved in an implementation of, for example,
AbstractDoubleSearchScript. Somewhere the values are cast to
java.lang.String, but I couldn't find where. Is this behavior expected?
A hint that might help solve the riddle: if the value placed into the param
is a java.util.HashMap instead of Test,
that is .param("test", someHashMap<String, Test>)), it works as expected.
The parameters supported are only the ones supported by "json", i.e. native
types (numeric, string), and map/lists. Are you trying to pass a "custom"
class? In this case, it will just pass the "toString" representation of it.
A hint that might help solve the riddle: if the value placed into the
param is a java.util.HashMap instead of Test,
that is .param("test", someHashMap<String, Test>)), it works as expected.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.