]> source.dussan.org Git - archiva.git/commitdiff
[MRM-749]
authorMaria Odea B. Ching <oching@apache.org>
Mon, 2 Feb 2009 08:27:15 +0000 (08:27 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Mon, 2 Feb 2009 08:27:15 +0000 (08:27 +0000)
o integrate search within search results in webapp

git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-nexus-indexer@739940 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java

index 940708b02ee9571998c567427c89c282a60d7edc..607524fc6b41088e0de2cb6786913df96c6ee737 100644 (file)
@@ -255,24 +255,25 @@ public class SearchAction
         }
         else
         {
-            if( searchResultsOnly && !completeQueryString.equals( "" ) )
+            try
             {
-                results = crossRepoSearch.searchForTerm( getPrincipal(), selectedRepos, q, limits, parseCompleteQueryString() );
-            }
-            else
-            {
-                completeQueryString = "";
-                //results = crossRepoSearch.searchForTerm( getPrincipal(), selectedRepos, q, limits );
-                try
+                if( searchResultsOnly && !completeQueryString.equals( "" ) )
                 {
-                    results = getNexusSearch().search( getPrincipal(), selectedRepos, q, limits, null );
+                    //results = crossRepoSearch.searchForTerm( getPrincipal(), selectedRepos, q, limits, parseCompleteQueryString() );                    
+                    results = getNexusSearch().search( getPrincipal(), selectedRepos, q, limits, parseCompleteQueryString() );                   
                 }
-                catch ( RepositorySearchException e )
+                else
                 {
-                    addActionError( e.getMessage() );
-                    return ERROR;
+                    completeQueryString = "";
+                    //results = crossRepoSearch.searchForTerm( getPrincipal(), selectedRepos, q, limits );                    
+                    results = getNexusSearch().search( getPrincipal(), selectedRepos, q, limits, null );                    
                 }
             }
+            catch ( RepositorySearchException e )
+            {
+                addActionError( e.getMessage() );
+                return ERROR;
+            }
         }
 
         if ( results.isEmpty() )