Examples of LuceneQuery


Examples of org.apache.maven.archiva.indexer.lucene.LuceneQuery

        try
        {
            QueryParser parser = new MultiFieldQueryParser( new String[]{HashcodesKeys.MD5, HashcodesKeys.SHA1},
                                                            new HashcodesHandlers().getAnalyzer() );
            LuceneQuery query = new LuceneQuery( parser.parse( checksum ) );
            SearchResults results = searchAll( query, limits, indexes );
            results.getRepositories().addAll( this.localIndexedRepositories );

            return results;
        }
View Full Code Here

Examples of org.apache.maven.archiva.indexer.lucene.LuceneQuery

        List indexes = getHashcodeIndexes();

        try
        {
            QueryParser parser = new BytecodeHandlers().getQueryParser();
            LuceneQuery query = new LuceneQuery( parser.parse( term ) );
            SearchResults results = searchAll( query, limits, indexes );
            results.getRepositories().addAll( this.localIndexedRepositories );

            return results;
        }
View Full Code Here

Examples of org.apache.maven.archiva.indexer.lucene.LuceneQuery

        List indexes = getFileContentIndexes();

        try
        {
            QueryParser parser = new FileContentHandlers().getQueryParser();
            LuceneQuery query = new LuceneQuery( parser.parse( term ) );
            SearchResults results = searchAll( query, limits, indexes );
            results.getRepositories().addAll( this.localIndexedRepositories );

            return results;
        }
View Full Code Here

Examples of org.apache.maven.archiva.indexer.lucene.LuceneQuery

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

                    if ( !results.isEmpty() )
                    {
                        for ( Iterator i = results.iterator(); i.hasNext(); )
View Full Code Here

Examples of org.apache.maven.archiva.indexer.lucene.LuceneQuery

        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

Examples of org.apache.maven.archiva.indexer.lucene.LuceneQuery

        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

Examples of org.apache.maven.archiva.indexer.lucene.LuceneQuery

            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" );
            return INPUT;
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.