Examples of SearchResultLimits


Examples of org.apache.maven.archiva.indexer.search.SearchResultLimits

         * present in the full text search.
         */

        assert q != null && q.length() != 0;
       
        SearchResultLimits limits = new SearchResultLimits( currentPage );
       
        List<String> selectedRepos = getObservableRepos();
        if ( CollectionUtils.isEmpty( selectedRepos ) )
        {
            return GlobalResults.ACCESS_TO_NO_REPOS;
        }

        if( isBytecodeSearch( q ) )
        {  
            results = crossRepoSearch.searchForBytecode( getPrincipal(), selectedRepos, removeKeyword( q ), limits );
        }
        else
        {
            if( searchResultsOnly && !completeQueryString.equals( "" ) )
            {
                results = crossRepoSearch.searchForTerm( getPrincipal(), selectedRepos, q, limits, parseCompleteQueryString() );
            }
            else
            {
                completeQueryString = "";
                results = crossRepoSearch.searchForTerm( getPrincipal(), selectedRepos, q, limits );
            }
        }
       
        if ( results.isEmpty() )
        {
            addActionError( "No results found" );
            return INPUT;
        }
       
        totalPages = results.getTotalHits() / limits.getPageSize();
       
        if( (results.getTotalHits() % limits.getPageSize()) != 0 )
        {
            totalPages = totalPages + 1;
        }
        // TODO: filter / combine the artifacts by version? (is that even possible with non-artifact hits?)

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.