[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
This commit is contained in:
Maria Odea B. Ching 2008-07-08 11:20:11 +00:00
parent 8b9ec9fa88
commit 8d428ccfd1
1 changed files with 6 additions and 1 deletions

View File

@ -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;
}