|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.scaffold.lucene.Engine
public final class Engine
Search engine methods for Lucene.
| Constructor Summary | |
|---|---|
Engine()
|
|
| Method Summary | |
|---|---|
static String |
blankNull(String string)
Convenience method to use an empty string in place of a null for indexing. |
static int |
deleteTerm(org.apache.lucene.index.Term term)
Delete record matching term from default index. |
static org.apache.lucene.analysis.Analyzer |
getAnalyzer()
Return default analyzer for application A non-English site should use a different analyzer |
static org.apache.lucene.search.Hits |
getHits(org.apache.lucene.search.Query query)
Return hits for model using default searcher. |
static String |
getIndexPath()
Return path for index. |
static org.apache.lucene.index.IndexReader |
getIndexReader()
Return default reader for application. |
static org.apache.lucene.index.IndexWriter |
getIndexWriter(boolean create)
Return default writer for application. |
static org.apache.lucene.search.Query |
getQuery(String value,
String field)
Return hits for value and field |
static org.apache.lucene.search.Searcher |
getSearcher()
Return default searcher for application. |
static void |
init(String _indexPath)
Set path for index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Engine()
| Method Detail |
|---|
public static String getIndexPath()
public static void init(String _indexPath)
public static final String blankNull(String string)
string - The string to test for null
public static final org.apache.lucene.analysis.Analyzer getAnalyzer()
Throws - ResourceException on IO error
public static final org.apache.lucene.search.Searcher getSearcher()
throws ResourceException
Throws - ResourceException on IO error
ResourceException
public static final org.apache.lucene.index.IndexWriter getIndexWriter(boolean create)
throws ResourceException
Set - to true to create a new index; usually false.
Throws - ResourceException on IO error
ResourceException
public static final org.apache.lucene.index.IndexReader getIndexReader()
throws ResourceException
Throws - ResourceException on IO error
ResourceException
public static final org.apache.lucene.search.Hits getHits(org.apache.lucene.search.Query query)
throws ResourceException
query - The query we are processing
ResourceException
public static final org.apache.lucene.search.Query getQuery(String value,
String field)
throws ParameterException
value - The term to match ("Smith")field - The field to patch ("name")
ParameterException
public static final int deleteTerm(org.apache.lucene.index.Term term)
throws ResourceException
term - The term matching the entry to delete
Throws - ResourceException on IO error
ResourceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||