public ResultadoPesquisaDocumento SearchContent( string text, int page, string startDate = null, string endDate = null, int tipodocumentoId = 0) { if (text == null) { text = string.Empty; } var contentsWithTextId = this.searchEngine .SearchDocumentosIds(text, tipodocumentoId, startDate, endDate) .ToArray(); var documentosIds = this.autorizaVisualizacaoDocumento .ObterConteudosAutorizados(contentsWithTextId); //// obtem apenas os contents do paginamento atual var result = new ResultadosPesquisa( documentosIds, this.configuracoesDaAplicacao.MaximoResultadoPorPagina, page, documentosIds.Length); var currentPageIds = result.ObterDocumentosDaPagina(page).ToArray(); var fetchedContents = this.documentoRepositorio .ObterPorIdsComTipoDocumentoEIndexacoes(currentPageIds); return(new ResultadoPesquisaDocumento(result, fetchedContents, documentosIds, this.searchEngine)); }
public ResultadoPesquisaDocumento SearchContent( string text, int page, string startDate = null, string endDate = null, int tipodocumentoId = 0) { if (text == null) { text = string.Empty; } var contentsWithTextId = this.searchEngine .SearchDocumentosIds(text, tipodocumentoId, startDate, endDate) .ToArray(); var documentosIds = this.autorizaVisualizacaoDocumento .ObterConteudosAutorizados(contentsWithTextId); //// obtem apenas os contents do paginamento atual var result = new ResultadosPesquisa( documentosIds, this.configuracoesDaAplicacao.MaximoResultadoPorPagina, page, documentosIds.Length); var currentPageIds = result.ObterDocumentosDaPagina(page).ToArray(); var fetchedContents = this.documentoRepositorio .ObterPorIdsComTipoDocumentoEIndexacoes(currentPageIds); return new ResultadoPesquisaDocumento(result, fetchedContents, documentosIds, this.searchEngine); }
public ResultadoPesquisaDocumento( ResultadosPesquisa searchResults, IList<Documento> documentos, IList<int> allContentsIdsFound, ISearchEngine searchEngine) { this.documentos = documentos; this.SearchEngine = searchEngine; this.TodosOsDocumentosIdsEncontrados = allContentsIdsFound; this.ResultadoPesquisa = searchResults; }
public ResultadoPesquisaDocumento( ResultadosPesquisa searchResults, IList <Documento> documentos, IList <int> allContentsIdsFound, ISearchEngine searchEngine) { this.documentos = documentos; this.SearchEngine = searchEngine; this.TodosOsDocumentosIdsEncontrados = allContentsIdsFound; this.ResultadoPesquisa = searchResults; }