use of org.orcid.utils.solr.entities.OrcidSolrResult in project ORCID-Source by ORCID.
the class OrcidSearchManagerImplTest method multipleResultsForQuery.
private OrcidSolrResults multipleResultsForQuery() {
OrcidSolrResults orcidSolrResults = new OrcidSolrResults();
List<OrcidSolrResult> resultsList = new ArrayList<>();
orcidSolrResults.setResults(resultsList);
resultsList.add(getOrcidSolrResult("5678", new Float(37.2)));
resultsList.add(getOrcidSolrResult("6789", new Float(52.2)));
orcidSolrResults.setNumFound(2);
return orcidSolrResults;
}
use of org.orcid.utils.solr.entities.OrcidSolrResult in project ORCID-Source by ORCID.
the class OrcidSearchManagerImpl method findOrcidsByQuery.
@Override
public OrcidMessage findOrcidsByQuery(String query, Integer start, Integer rows) {
OrcidMessage orcidMessage = new OrcidMessage();
OrcidSearchResults searchResults = new OrcidSearchResults();
OrcidSolrResults orcidSolrResults = solrDao.findByDocumentCriteria(query, start, rows);
searchResults.setNumFound(orcidSolrResults.getNumFound());
List<OrcidSolrResult> indexedOrcids = orcidSolrResults.getResults();
if (indexedOrcids != null && !indexedOrcids.isEmpty()) {
List<OrcidSearchResult> orcidSearchResults = buildSearchResultsFromPublicProfile(indexedOrcids);
searchResults.getOrcidSearchResult().addAll(orcidSearchResults);
}
orcidMessage.setOrcidSearchResults(searchResults);
return orcidMessage;
}
use of org.orcid.utils.solr.entities.OrcidSolrResult in project ORCID-Source by ORCID.
the class OrcidSearchManagerImplTest method invalidRecordSearchResult.
private OrcidSolrResults invalidRecordSearchResult() {
OrcidSolrResults orcidSolrResults = new OrcidSolrResults();
List<OrcidSolrResult> resultsList = new ArrayList<>();
orcidSolrResults.setResults(resultsList);
resultsList.add(getOrcidSolrResult("0000", new Float(37.2)));
orcidSolrResults.setNumFound(2);
return orcidSolrResults;
}
Aggregations