Package org.apache.maven.archiva.indexer

Examples of org.apache.maven.archiva.indexer.RepositoryArtifactIndex.search()


            if ( checksum != null )
            {
                try
                {
                    List results = index
                        .search( new LuceneQuery( new TermQuery( new Term( StandardIndexRecordFields.MD5, checksum
                            .toLowerCase() ) ) ) );

                    if ( !results.isEmpty() )
                    {
View Full Code Here


        model = project.getModel();

        RepositoryArtifactIndex index = getIndex();

        String id = createId( groupId, artifactId, version );
        List records = index.search( new LuceneQuery( new TermQuery( new Term( "dependencies", id ) ) ) );

        dependencies = VersionMerger.merge( records );

        return SUCCESS;
    }
View Full Code Here

        MultiFieldQueryParser parser = new MultiFieldQueryParser( new String[]{StandardIndexRecordFields.GROUPID,
            StandardIndexRecordFields.ARTIFACTID, StandardIndexRecordFields.BASE_VERSION,
            StandardIndexRecordFields.CLASSIFIER, StandardIndexRecordFields.CLASSES, StandardIndexRecordFields.FILES,
            StandardIndexRecordFields.TYPE, StandardIndexRecordFields.PROJECT_NAME,
            StandardIndexRecordFields.PROJECT_DESCRIPTION}, LuceneRepositoryArtifactIndex.getAnalyzer() );
        searchResults = index.search( new LuceneQuery( parser.parse( q ) ) );

        if ( searchResults.isEmpty() )
        {
            addActionError( "No results found" );
            return INPUT;
View Full Code Here

        {
            addActionError( "The repository is not yet indexed. Please wait, and then try again." );
            return ERROR;
        }

        searchResults = index.search(
            new LuceneQuery( new TermQuery( new Term( StandardIndexRecordFields.MD5, md5.toLowerCase() ) ) ) );

        if ( searchResults.isEmpty() )
        {
            addActionError( "No results found" );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.