Project

General

Profile

1
package eu.dnetlib.functionality.index.query;
2

    
3
import eu.dnetlib.functionality.index.client.IndexClientException;
4
import eu.dnetlib.functionality.index.utils.MetadataReference;
5
import org.apache.solr.client.solrj.response.QueryResponse;
6

    
7
/**
8
 * The Class SolrIndexQueryResponseFactory.
9
 */
10
public class SolrIndexQueryResponseFactory extends QueryResponseFactory<QueryResponse> {
11

    
12
	/**
13
	 * {@inheritDoc}
14
	 * 
15
	 * @throws IndexClientException
16
	 *
17
	 * @see QueryResponseFactory#getQueryResponseParser(IndexQueryResponse,
18
	 *      MetadataReference)
19
	 */
20
	@Override
21
	public QueryResponseParser getQueryResponseParser(final IndexQueryResponse<QueryResponse> queryRsp, final MetadataReference mdRef)
22
			throws IndexClientException {
23

    
24
		QueryResponse response = queryRsp.getContextualQueryResponse();
25
		return new SolrResponseParser(highlightUtils, browseAliases.get(mdRef), returnEmptyFields, includeRanking, response);
26
	}
27

    
28
}
(13-13/15)