org.crosswire.jsword.book.search.lucene
Class IndexSearcher

java.lang.Object
  extended by org.crosswire.jsword.book.search.lucene.IndexSearcher
All Implemented Interfaces:
Searcher

public class IndexSearcher
extends Object
implements Searcher

The central interface to all searching. Functionality the I invisage includes:

Author:
Joe Walker [joe at eireneh dot com]
See Also:
for license details. The copyright to this program is held by it's authors.

Field Summary
private  Index index
          The index
 
Constructor Summary
IndexSearcher()
           
 
Method Summary
protected  Index getIndex()
          Accessor for the Bible to search.
 void init(Index newindex)
          Setup the index that this parser can use to do word level searches
protected  Key search(List matches)
          Take a search string and decipher it into a Key.
 Key search(SearchRequest request)
          Take a search request and decipher it into a Passage.
 Key search(String request)
          Take a search request and decipher it into a Passage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

private Index index
The index

Constructor Detail

IndexSearcher

public IndexSearcher()
Method Detail

init

public void init(Index newindex)
Description copied from interface: Searcher
Setup the index that this parser can use to do word level searches

Specified by:
init in interface Searcher
Parameters:
newindex - The Index to query for words

search

public Key search(String request)
           throws BookException
Description copied from interface: Searcher
Take a search request and decipher it into a Passage.

Specified by:
search in interface Searcher
Parameters:
request - The request
Returns:
The matching verses
Throws:
BookException

search

public Key search(SearchRequest request)
           throws BookException
Description copied from interface: Searcher
Take a search request and decipher it into a Passage.

Specified by:
search in interface Searcher
Parameters:
request - The request
Returns:
The matching verses
Throws:
BookException

search

protected Key search(List matches)
              throws BookException
Take a search string and decipher it into a Key.

Returns:
The matching verses
Throws:
BookException

getIndex

protected Index getIndex()
Accessor for the Bible to search.

Returns:
The current Bible

Copyright ยจ 2003-2005