aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2008-07-08 11:20:11 +0000
committerMaria Odea B. Ching <oching@apache.org>2008-07-08 11:20:11 +0000
commit8d428ccfd10d96868cd669a184f8e6b020632327 (patch)
treec88d000673ea3a12e83210cefae20e486b739093 /archiva-modules/archiva-base
parent8b9ec9fa8831710c03b433d41ba88a6ca83998b5 (diff)
downloadarchiva-8d428ccfd10d96868cd669a184f8e6b020632327.tar.gz
archiva-8d428ccfd10d96868cd669a184f8e6b020632327.zip
[MRM-730]
-search bytecode index if not found in filecontent index git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@674768 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/DefaultCrossRepositorySearch.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/DefaultCrossRepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/DefaultCrossRepositorySearch.java
index 98490ebe4..3ff954795 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/DefaultCrossRepositorySearch.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/search/DefaultCrossRepositorySearch.java
@@ -100,7 +100,7 @@ public class DefaultCrossRepositorySearch
public SearchResults searchForBytecode( String principal, List<String> selectedRepos, String term, SearchResultLimits limits )
{
- List<RepositoryContentIndex> indexes = getHashcodeIndexes( principal, selectedRepos );
+ List<RepositoryContentIndex> indexes = getBytecodeIndexes( principal, selectedRepos );
try
{
@@ -130,6 +130,11 @@ public class DefaultCrossRepositorySearch
LuceneQuery query = new LuceneQuery( parser.parse( term ) );
SearchResults results = searchAll( query, limits, indexes );
results.getRepositories().addAll( this.localIndexedRepositories );
+
+ if( results.getTotalHits() == 0 )
+ {
+ results = searchForBytecode( principal, selectedRepos, term, limits );
+ }
return results;
}