Package org.apache.cocoon.components.search

Examples of org.apache.cocoon.components.search.LuceneCocoonIndexer


        this.manager = manager;
    }

    public void createIndex(String baseURL, boolean create)
    throws ProcessingException {
        LuceneCocoonIndexer lcii = null;
        Analyzer analyzer = LuceneCocoonHelper.getAnalyzer( "org.apache.lucene.analysis.standard.StandardAnalyzer" );
       
        try {
       
            lcii = (LuceneCocoonIndexer)this.manager.lookup( LuceneCocoonIndexer.ROLE );
            Directory directory = LuceneCocoonHelper.getDirectory( new File( workDir, "index" ), create );
            lcii.setAnalyzer( analyzer );
            URL base_url = new URL( baseURL );
            lcii.index( directory, create, base_url );
        } catch (MalformedURLException mue) {
            throw new ProcessingException( "MalformedURLException in createIndex()!", mue );
        } catch (IOException ioe) {
            // ignore ??
            throw new ProcessingException( "IOException in createIndex()!", ioe );
View Full Code Here


        this.manager = manager;
    }

    public void createIndex(String baseURL, boolean create)
    throws ProcessingException {
        LuceneCocoonIndexer lcii = null;
        Analyzer analyzer = LuceneCocoonHelper.getAnalyzer( "org.apache.lucene.analysis.standard.StandardAnalyzer" );
       
        try {
       
            lcii = (LuceneCocoonIndexer)this.manager.lookup( LuceneCocoonIndexer.ROLE );
            Directory directory = LuceneCocoonHelper.getDirectory( new File( workDir, "index" ), create );
            lcii.setAnalyzer( analyzer );
            URL base_url = new URL( baseURL );
            lcii.index( directory, create, base_url );
        } catch (MalformedURLException mue) {
            throw new ProcessingException( "MalformedURLException in createIndex()!", mue );
        } catch (IOException ioe) {
            // ignore ??
            throw new ProcessingException( "IOException in createIndex()!", ioe );
View Full Code Here

TOP

Related Classes of org.apache.cocoon.components.search.LuceneCocoonIndexer

Copyright © 2018 www.massapicom. 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.