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());
        }
Exemple #2
0
        public async Task <List <DocumentSearchOutput> > SearchAsync(DocumentSearchInput input)
        {
            var project = await _projectRepository.GetAsync(input.ProjectId);

            input.Version = GetProjectVersionPrefixIfExist(project) + input.Version;

            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
            }).Where(x => x.FileName != project.NavigationDocumentName && x.FileName != project.ParametersDocumentName).ToList());
        }
Exemple #3
0
 public Task <List <DocumentSearchOutput> > SearchAsync(DocumentSearchInput input)
 {
     return(DocumentAppService.SearchAsync(input));
 }