Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.book.search
Interface Index

All Known Implementing Classes:
  AbstractIndex, LuceneIndex

    public interface Index

An index into a body of text that knows what words exist and where they are.

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

Method Summary
`Key` | `find(String query)` Find the set of references that satisfy the query.
`Key` | `getKey(String name)` An index must be able to create KeyLists for users in a similar way to the Book that it is indexing.
`SearchModifier` | `getSearchModifier()` Get the current SearchModifier.
`void` | `setSearchModifier(SearchModifier modifier)` Set any modifier for the current and subsequent search.

Method Detail

### find

    Key find(String query)
             throws BookException

  Find the set of references that satisfy the query. Query is anything that the underlying index can handle. If the `query` being searched for is null then an empty Key MUST be returned. Users of this index may use this functionality to get empty KeyLists which they then use to aggregate other searches done on this index.

  Parameters:
    `query` - The text to search for
  Returns:
    The references to the word
  Throws:
    `BookException`

### getKey

    Key getKey(String name)
               throws NoSuchKeyException

  An index must be able to create KeyLists for users in a similar way to the Book that it is indexing.

  Parameters:
    `name` - The string to convert to a Key
  Returns:
    A new Key representing the given string, if possible
  Throws:
    `NoSuchKeyException` - If the string can not be turned into a Key
  See Also:
    `KeyFactory.getKey(String)`

### setSearchModifier

    void setSearchModifier(SearchModifier modifier)

  Set any modifier for the current and subsequent search. Using null will clear the search modifier.

  Parameters:
    `modifier` - how to modify the search and its results.

### getSearchModifier

    SearchModifier getSearchModifier()

  Get the current SearchModifier. If there is none then return null.

  Returns:
    the current search modifier, or null if there is not one.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD