include the bytecode index to the searcheables in searchForTerm(..) instead of just searching it if the file content search returned

nothing


git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@676854 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2008-07-15 09:59:23 +00:00
parent e0566ec1c1
commit 20fb87d33b
1 changed files with 2 additions and 5 deletions

View File

@ -123,6 +123,8 @@ public class DefaultCrossRepositorySearch
public SearchResults searchForTerm( String principal, List<String> selectedRepos, String term, SearchResultLimits limits )
{
List<RepositoryContentIndex> indexes = getFileContentIndexes( principal, selectedRepos );
List<RepositoryContentIndex> bytecodeIndices = getBytecodeIndexes( principal, selectedRepos );
indexes.addAll( bytecodeIndices );
try
{
@ -131,11 +133,6 @@ public class DefaultCrossRepositorySearch
SearchResults results = searchAll( query, limits, indexes );
results.getRepositories().addAll( this.localIndexedRepositories );
if( results.getTotalHits() == 0 )
{
results = searchForBytecode( principal, selectedRepos, term, limits );
}
return results;
}
catch ( ParseException e )