Package org.apache.camel.component.lucene

Examples of org.apache.camel.component.lucene.LuceneSearcher


    public void process(Exchange exchange) throws Exception {
        Hits hits;

        String phrase = exchange.getIn().getHeader("QUERY", String.class);
        if (phrase != null) {
            searcher = new LuceneSearcher();
            searcher.open(indexDirectory, analyzer);
            hits = searcher.search(phrase, maxNumberOfHits);           
        } else {
            throw new IllegalArgumentException("SearchPhrase for LuceneQueryProcessor not set. Set the Header value: QUERY");
        }           
View Full Code Here


    public void process(Exchange exchange) throws Exception {
        Hits hits;

        String phrase = exchange.getIn().getHeader("QUERY", String.class);
        if (phrase != null) {
            searcher = new LuceneSearcher();
            searcher.open(indexDirectory, analyzer);
            hits = searcher.search(phrase, maxNumberOfHits, luceneVersion);           
        } else {
            throw new IllegalArgumentException("SearchPhrase for LuceneQueryProcessor not set. Set the Header value: QUERY");
        }           
View Full Code Here

TOP

Related Classes of org.apache.camel.component.lucene.LuceneSearcher

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.