Closed
Description
We have a runtime field that contains multiple string values. Currently the getFieldValue method returns only the first value of the field. Could you please provide support for returning lists as well?
Thank you.
public interface SearchDocument extends Document {
float getScore();
Map<String, List<Object>> getFields();
@Nullable
default <V> V getFieldValue(final String name) {
List<Object> values = (List)this.getFields().get(name);
return (V)(values != null && !values.isEmpty() ? values.get(0) : null);
}