maiolum.xml
Class BibleSearch
java.lang.Object
maiolum.xml.BibleSearch
- public class BibleSearch
- extends java.lang.Object
BibleSearch is a helper class to simplify searching
in documents indexed by Apache Lucene search engine.
Given location of index (as file path), ...
|
Field Summary |
private org.apache.lucene.analysis.Analyzer |
analyzer
|
private org.apache.lucene.search.Hits |
hits
|
private java.lang.String |
indexLocation
|
private static org.apache.log4j.Logger |
logger
|
private org.apache.lucene.search.Query |
query
|
private boolean |
searchDone
|
private org.apache.lucene.search.Searcher |
searcher
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static org.apache.log4j.Logger logger
indexLocation
private java.lang.String indexLocation
searcher
private org.apache.lucene.search.Searcher searcher
analyzer
private org.apache.lucene.analysis.Analyzer analyzer
hits
private org.apache.lucene.search.Hits hits
query
private org.apache.lucene.search.Query query
searchDone
private boolean searchDone
BibleSearch
public BibleSearch()
throws java.io.IOException
getIndexLocation
public java.lang.String getIndexLocation()
setIndexLocation
public void setIndexLocation(java.lang.String location)
throws java.io.IOException
- Throws:
java.io.IOException
getAnalyzer
public org.apache.lucene.analysis.Analyzer getAnalyzer()
setAnalyzer
public void setAnalyzer(org.apache.lucene.analysis.Analyzer a)
getHits
public org.apache.lucene.search.Hits getHits()
search
public void search(java.lang.String queryString,
java.lang.String defaultField)
throws org.apache.lucene.queryParser.ParseException,
java.io.IOException
- Throws:
org.apache.lucene.queryParser.ParseException
java.io.IOException
executeSearch
private void executeSearch(org.apache.lucene.search.Query q)
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
getDocuments
public java.util.Enumeration getDocuments()
throws java.io.IOException
- Throws:
java.io.IOException