コード例 #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
ファイル: DocumentAppService.cs プロジェクト: zjc-china/abp
        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());
        }