From f3a0c76b3741b7c51c545a50a7d39ce899629878 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Mon, 2 Feb 2009 08:27:15 +0000 Subject: [PATCH] [MRM-749] 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/web/action/SearchAction.java | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java index 940708b02..607524fc6 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java @@ -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() ) -- 2.39.5