1
|
package eu.dnetlib.index.query;
|
2
|
|
3
|
import eu.dnetlib.clients.index.client.IndexClientException;
|
4
|
import eu.dnetlib.clients.index.query.IndexQueryResponse;
|
5
|
import eu.dnetlib.clients.index.query.QueryResponseFactory;
|
6
|
import eu.dnetlib.clients.index.query.QueryResponseParser;
|
7
|
import eu.dnetlib.utils.MetadataReference;
|
8
|
import org.apache.solr.client.solrj.response.QueryResponse;
|
9
|
|
10
|
/**
|
11
|
* The Class SolrIndexQueryResponseFactory.
|
12
|
*/
|
13
|
public class SolrIndexQueryResponseFactory extends QueryResponseFactory<QueryResponse> {
|
14
|
|
15
|
/**
|
16
|
* {@inheritDoc}
|
17
|
*
|
18
|
* @throws IndexClientException
|
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
|
}
|