Search in sources :

Example 6 with SearchResult

use of com.odysseusinc.arachne.portal.service.impl.solr.SearchResult in project ArachneCentralAPI by OHDSI.

the class BaseDataSourceServiceImpl method getExcludedOptions.

private Map<String, List<String>> getExcludedOptions(IUser user) throws NoSuchFieldException, IOException, SolrServerException {
    SolrQuery solrQuery = conversionService.convert(new SearchDataCatalogDTO(true), SolrQuery.class);
    solrQuery = addFilterQuery(solrQuery, user);
    QueryResponse solrResponse = solrSearch(solrQuery);
    SearchResult<Long> searchResult = new SearchResult<>(solrQuery, solrResponse, Collections.<Long>emptyList());
    return searchResult.excludedOptions();
}
Also used : QueryResponse(org.apache.solr.client.solrj.response.QueryResponse) SearchDataCatalogDTO(com.odysseusinc.arachne.portal.api.v1.dto.SearchDataCatalogDTO) SearchResult(com.odysseusinc.arachne.portal.service.impl.solr.SearchResult) SolrQuery(org.apache.solr.client.solrj.SolrQuery)

Aggregations

SearchResult (com.odysseusinc.arachne.portal.service.impl.solr.SearchResult)6 SolrQuery (org.apache.solr.client.solrj.SolrQuery)6 QueryResponse (org.apache.solr.client.solrj.response.QueryResponse)5 SearchExpertListDTO (com.odysseusinc.arachne.portal.api.v1.dto.SearchExpertListDTO)2 WebSecurityConfig (com.odysseusinc.arachne.portal.config.WebSecurityConfig)2 NotExistException (com.odysseusinc.arachne.portal.exception.NotExistException)2 PermissionDeniedException (com.odysseusinc.arachne.portal.exception.PermissionDeniedException)2 DataSourceStatus (com.odysseusinc.arachne.portal.model.DataSourceStatus)2 IUser (com.odysseusinc.arachne.portal.model.IUser)2 Skill (com.odysseusinc.arachne.portal.model.Skill)2 SolrCollection (com.odysseusinc.arachne.portal.model.solr.SolrCollection)2 BaseSolrService (com.odysseusinc.arachne.portal.service.BaseSolrService)2 BaseUserService (com.odysseusinc.arachne.portal.service.BaseUserService)2 TenantService (com.odysseusinc.arachne.portal.service.TenantService)2 FieldList (com.odysseusinc.arachne.portal.service.impl.solr.FieldList)2 SolrField (com.odysseusinc.arachne.portal.service.impl.solr.SolrField)2 ArachneMailSender (com.odysseusinc.arachne.portal.service.mail.ArachneMailSender)2 IOException (java.io.IOException)2 Collections (java.util.Collections)2 Comparator (java.util.Comparator)2