
org.molgenis.data.elasticsearch.util.Hit Maven / Gradle / Ivy
The newest version!
package org.molgenis.data.elasticsearch.util;
import java.util.Collections;
import java.util.Map;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* Represents a search hit found by the SearchService
*
* @author erwin
*
*/
public class Hit
{
private final String id;// document id
private final String documentType;// Document type (collection type)
private final Map columnValueMap;// key: fieldname,
// value:fieldvalue
public Hit(String id, String documentType, Map columnValueMap)
{
this.id = id;
this.documentType = documentType;
this.columnValueMap = columnValueMap;
}
public String getId()
{
return id;
}
public String getDocumentType()
{
return documentType;
}
public Map getColumnValueMap()
{
return Collections.unmodifiableMap(columnValueMap);
}
@Override
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy