Examples of SearchResultLimits


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

        action.setManagedRepositoryList(managedRepos);
        action.setCurrentPage(0);
        action.setRowCount(30);
        action.setGroupId("org");

        SearchResultLimits limits = new SearchResultLimits(action.getCurrentPage());
        limits.setPageSize(30);

        SearchResultHit hit = new SearchResultHit();
        hit.setGroupId("org.apache.archiva");
        hit.setArtifactId("archiva-configuration");
        hit.setUrl("url");
View Full Code Here

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

        action.setManagedRepositoryList(managedRepos);
        action.setCurrentPage(0);
        action.setRowCount(30);
        action.setGroupId("org");

        SearchResultLimits limits = new SearchResultLimits(action.getCurrentPage());
        limits.setPageSize(30);

        SearchResultHit hit = new SearchResultHit();
        hit.setGroupId("org.apache.archiva");
        hit.setArtifactId("archiva-configuration");
        hit.setUrl("url");
View Full Code Here

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

        action.setManagedRepositoryList(managedRepos);
        action.setCurrentPage(0);
        action.setRowCount(30);
        action.setGroupId("org");

        SearchResultLimits limits = new SearchResultLimits(action.getCurrentPage());
        limits.setPageSize(30);

        SearchResults results = new SearchResults();

        List<String> selectedRepos = new ArrayList<String>();
        selectedRepos.add("internal");
View Full Code Here

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( 0 );

        results = crossRepoSearch.searchForTerm( q, limits );

        if ( results.isEmpty() )
        {
View Full Code Here

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( 0 );
       
        List<String> selectedRepos = getObservableRepos();
        if ( CollectionUtils.isEmpty( selectedRepos ) )
        {
            return GlobalResults.ACCESS_TO_NO_REPOS;
View Full Code Here

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

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

       
        List<String> selectedRepos = new ArrayList<String>();
        selectedRepos.add( "test-repo" );
       
        // search for class names
        SearchResults results = searcher.searchForBytecode( "", selectedRepos, "FirstPackageApp", new SearchResultLimits( 0 ) );
        assertEquals( 1, results.getTotalHits() );
       
        results = searcher.searchForBytecode( "", selectedRepos, "SecondPackageApp", new SearchResultLimits( 0 ) );
        assertEquals( 1, results.getTotalHits() );
      
        // search for public methods
        results = searcher.searchForBytecode( "", selectedRepos, "appMethodOne", new SearchResultLimits( 0 ) );
        assertEquals( 1, results.getTotalHits() );
       
        // should return only the overridding public method in SecondPackageApp
        results = searcher.searchForBytecode( "", selectedRepos, "protectedMethod", new SearchResultLimits( 0 ) );
        assertEquals( 1, results.getTotalHits() );
              
        // should not return any private methods
        results = searcher.searchForBytecode( "", selectedRepos, "privMethod", new SearchResultLimits( 0 ) );
        assertEquals( 0, results.getTotalHits() );
       
        // test for public variables?
    }
View Full Code Here

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( 0 );

        results = crossRepoSearch.searchForTerm( q, limits );

        if ( results.isEmpty() )
        {
View Full Code Here

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( 0 );

        results = crossRepoSearch.searchForTerm( q, limits );

        if ( results.isEmpty() )
        {
View Full Code Here

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

        {
            addActionError( "Unable to search for a blank checksum" );
            return INPUT;
        }

        SearchResultLimits limits = new SearchResultLimits( 0 );

        results = crossRepoSearch.searchForChecksum( q, limits );

        if ( results.isEmpty() )
        {
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.