org.molgenis.data.semanticsearch.explain.service.ElasticSearchExplainService Maven / Gradle / Ivy
package org.molgenis.data.semanticsearch.explain.service;
import org.apache.lucene.search.Explanation;
import org.molgenis.data.Entity;
import org.molgenis.data.Query;
import org.molgenis.data.meta.model.EntityType;
import org.molgenis.data.semanticsearch.explain.bean.ExplainedQueryString;
import java.util.Map;
import java.util.Set;
public interface ElasticSearchExplainService
{
/**
* Get explanation for a specific document in elasticSearch
*
* @param documentId
* @param q
* @return
*/
Explanation explain(Query q, EntityType entityType, String documentId);
/**
* Deduce all the matches that are generated by ElasticSearch
*
* @param explanation
* @return
*/
Set findQueriesFromExplanation(Map collectExpanedQueryMap,
Explanation explanation);
}