org.carrot2.input.lucene
Class LuceneLocalInputComponentFactory

java.lang.Object
  extended by org.carrot2.input.lucene.LuceneLocalInputComponentFactory
All Implemented Interfaces:
LocalComponentFactory

public class LuceneLocalInputComponentFactory
extends Object
implements LocalComponentFactory

Version:
$Revision: 2122 $
Author:
Stanislaw Osinski

Field Summary
static AnalyzerFactory DEFAULT_ANALYZER_FACTORY
          Default Analyzer Factory returns StandardAnalyzerwrapped with PorterStemFilter
static String[] DEFAULT_SEARCH_FIELDS
          Default search fields: DEFAULT_TITLE_FIELD, DEFAULT_SUMMARY_FIELD
static String DEFAULT_SUMMARY_FIELD
          Default title field name
static String DEFAULT_TITLE_FIELD
          Default title field name
static String DEFAULT_URL_FIELD
          Default title field name
 
Constructor Summary
LuceneLocalInputComponentFactory(org.apache.lucene.search.Searcher searcher)
          Creates a Lucene input component factory that produces LuceneLocalInputComponent instances that use the specified Searcher and default field names and the default analyzer.
LuceneLocalInputComponentFactory(org.apache.lucene.search.Searcher searcher, LuceneLocalInputComponentFactoryConfig luceneSearchConfig, AnalyzerFactory analyzerFactory)
          Creates a Lucene input component factory that produces LuceneLocalInputComponent instances using the specified searcher, the specified search configuration (field names) and the specified analyzer.
LuceneLocalInputComponentFactory(String indexDirectory)
          CCreates a Lucene input component factory that produces LuceneLocalInputComponent instances that read index at the specified location with default field names and the default analyzer.
LuceneLocalInputComponentFactory(String indexDirectory, LuceneLocalInputComponentFactoryConfig luceneSearchConfig, AnalyzerFactory analyzerFactory)
          Creates a Lucene input component factory that produces LuceneLocalInputComponent instances that read index at the specified location and uses the specified search configuration (field names) and the specified analyzer.
 
Method Summary
 LocalComponent getInstance()
          Produces a new instance of a component implementing LocalComponent interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TITLE_FIELD

public static final String DEFAULT_TITLE_FIELD
Default title field name

See Also:
Constant Field Values

DEFAULT_SUMMARY_FIELD

public static final String DEFAULT_SUMMARY_FIELD
Default title field name

See Also:
Constant Field Values

DEFAULT_URL_FIELD

public static final String DEFAULT_URL_FIELD
Default title field name

See Also:
Constant Field Values

DEFAULT_SEARCH_FIELDS

public static final String[] DEFAULT_SEARCH_FIELDS
Default search fields: DEFAULT_TITLE_FIELD, DEFAULT_SUMMARY_FIELD


DEFAULT_ANALYZER_FACTORY

public static final AnalyzerFactory DEFAULT_ANALYZER_FACTORY
Default Analyzer Factory returns StandardAnalyzerwrapped with PorterStemFilter

Constructor Detail

LuceneLocalInputComponentFactory

public LuceneLocalInputComponentFactory(String indexDirectory)
                                 throws IOException
CCreates a Lucene input component factory that produces LuceneLocalInputComponent instances that read index at the specified location with default field names and the default analyzer.

Parameters:
indexDirectory -
Throws:
IOException

LuceneLocalInputComponentFactory

public LuceneLocalInputComponentFactory(org.apache.lucene.search.Searcher searcher)
Creates a Lucene input component factory that produces LuceneLocalInputComponent instances that use the specified Searcher and default field names and the default analyzer.

Parameters:
searcher -

LuceneLocalInputComponentFactory

public LuceneLocalInputComponentFactory(String indexDirectory,
                                        LuceneLocalInputComponentFactoryConfig luceneSearchConfig,
                                        AnalyzerFactory analyzerFactory)
                                 throws IOException
Creates a Lucene input component factory that produces LuceneLocalInputComponent instances that read index at the specified location and uses the specified search configuration (field names) and the specified analyzer.

Throws:
IOException

LuceneLocalInputComponentFactory

public LuceneLocalInputComponentFactory(org.apache.lucene.search.Searcher searcher,
                                        LuceneLocalInputComponentFactoryConfig luceneSearchConfig,
                                        AnalyzerFactory analyzerFactory)
Creates a Lucene input component factory that produces LuceneLocalInputComponent instances using the specified searcher, the specified search configuration (field names) and the specified analyzer.

Method Detail

getInstance

public LocalComponent getInstance()
Description copied from interface: LocalComponentFactory
Produces a new instance of a component implementing LocalComponent interface.

Specified by:
getInstance in interface LocalComponentFactory
Returns:
A new instance of a component. The method should never return null. In case of any error, an unchecked exception should be thrown.


Copyright (c) Dawid Weiss, Stanislaw Osinski