예제 #1
0
        public async Task <List <DocumentSearchOutput> > SearchAsync(DocumentSearchInput input)
        {
            var project = await _projectRepository.GetAsync(input.ProjectId);

            var esDocs = await _documentFullSearch.SearchAsync(input.Context, project.Id, input.LanguageCode, input.Version);

            return(esDocs.Select(esDoc => new DocumentSearchOutput//TODO: auto map
            {
                Name = esDoc.Name,
                FileName = esDoc.FileName,
                Version = esDoc.Version,
                LanguageCode = esDoc.LanguageCode,
                Highlight = esDoc.Highlight
            }).ToList());
        }
예제 #2
0
 public Task <List <DocumentSearchOutput> > SearchAsync(DocumentSearchInput input)
 {
     return(DocumentAppService.SearchAsync(input));
 }