mirror of https://github.com/apache/archiva.git
remove unneccessary codes in the searcher for tests
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@675099 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ce73f78809
commit
90ef668a99
|
@ -37,7 +37,6 @@ import org.apache.maven.archiva.indexer.bytecode.BytecodeHandlers;
|
|||
import org.apache.maven.archiva.indexer.lucene.LuceneEntryConverter;
|
||||
import org.apache.maven.archiva.indexer.lucene.LuceneQuery;
|
||||
import org.apache.maven.archiva.indexer.lucene.LuceneRepositoryContentRecord;
|
||||
import org.apache.maven.archiva.indexer.search.CrossRepositorySearch;
|
||||
import org.apache.maven.archiva.indexer.search.SearchResultLimits;
|
||||
import org.apache.maven.archiva.indexer.search.SearchResults;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -50,7 +49,6 @@ import org.slf4j.LoggerFactory;
|
|||
* @version
|
||||
*/
|
||||
public class IndexJavaPublicMethodsCrossRepositorySearch
|
||||
implements CrossRepositorySearch
|
||||
{
|
||||
private Logger log = LoggerFactory.getLogger( IndexJavaPublicMethodsCrossRepositorySearch.class );
|
||||
|
||||
|
@ -58,11 +56,6 @@ public class IndexJavaPublicMethodsCrossRepositorySearch
|
|||
|
||||
private RepositoryContentIndexFactory indexFactory;
|
||||
|
||||
public IndexJavaPublicMethodsCrossRepositorySearch()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public IndexJavaPublicMethodsCrossRepositorySearch( ManagedRepositoryConfiguration localIndexedRepo, RepositoryContentIndexFactory indexFactory )
|
||||
{
|
||||
this.localIndexedRepo = localIndexedRepo;
|
||||
|
@ -70,13 +63,11 @@ public class IndexJavaPublicMethodsCrossRepositorySearch
|
|||
}
|
||||
|
||||
public SearchResults searchForBytecode( String principal, List<String> selectedRepos, String term,
|
||||
SearchResultLimits limits )
|
||||
SearchResultLimits limits ) throws ParseException
|
||||
{
|
||||
List<RepositoryContentIndex> indexes = new ArrayList<RepositoryContentIndex>();
|
||||
indexes.add( indexFactory.createBytecodeIndex( localIndexedRepo ) );
|
||||
|
||||
try
|
||||
{
|
||||
QueryParser parser = new BytecodeHandlers().getQueryParser();
|
||||
LuceneQuery query = new LuceneQuery( parser.parse( term ) );
|
||||
SearchResults results = searchAll( query, limits, indexes );
|
||||
|
@ -84,27 +75,6 @@ public class IndexJavaPublicMethodsCrossRepositorySearch
|
|||
|
||||
return results;
|
||||
}
|
||||
catch ( ParseException e )
|
||||
{
|
||||
log.error( e.getMessage() );
|
||||
}
|
||||
|
||||
return new SearchResults();
|
||||
}
|
||||
|
||||
public SearchResults searchForChecksum( String principal, List<String> selectedRepos, String checksum,
|
||||
SearchResultLimits limits )
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
public SearchResults searchForTerm( String principal, List<String> selectedRepos, String term,
|
||||
SearchResultLimits limits )
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private SearchResults searchAll( LuceneQuery luceneQuery, SearchResultLimits limits, List<RepositoryContentIndex> indexes )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue