| prefuse.data.search.SearchTupleSet prefuse.data.search.KeywordSearchTupleSet
KeywordSearchTupleSet | public class KeywordSearchTupleSet extends SearchTupleSet (Code) | |
SearchTupleSet implementation that performs text searches on indexed Tuple
data using the Lucene search engine.
Lucene is an open source search
engine supporting full text indexing and keyword search. Please refer to
the Lucene web page for more information. Note that for this class to be
used by prefuse applications, the Lucene classes must be included on the
application classpath.
version: 1.0 author: jeffrey heer See Also: prefuse.data.query.SearchQueryBinding |
Method Summary | |
public void | clear() Removes all search hits and clears out the index. | protected Document | getDocument(int id, String text) Create a Lucene Document instance with the given document ID and text. | public LuceneSearcher | getLuceneSearcher() Get the
LuceneSearcher instance used by this class. | protected Tuple | getMatchingTuple(Document d) Return the Tuple matching the given Lucene Document, if any.
Parameters: d - the Document to lookup. | public String | getQuery() Returns the current search query, if any. | public IntObjectHashMap | getTupleMap() Returns a copy of the mapping from Lucene document IDs to prefuse Tuple instances. | public void | index(Tuple t, String field) | public boolean | isUnindexSupported() Returns false, as unindexing values is not currently supported. | public void | search(String query) Searches the indexed Tuple fields for matching keywords, using
the Lucene search engine. | public void | unindex(Tuple t, String attrName) This method throws an exception, as unidexing is not supported. |
m_storeTermVectors | protected boolean m_storeTermVectors(Code) | | |
KeywordSearchTupleSet | public KeywordSearchTupleSet()(Code) | | Creates a new KeywordSearchFocusSet using an in-memory search index.
|
KeywordSearchTupleSet | public KeywordSearchTupleSet(LuceneSearcher searcher)(Code) | | Creates a new TextSearchFocusSet with the given LuceneSearcher.
Parameters: searcher - the LuceneSearcher to use. |
getDocument | protected Document getDocument(int id, String text)(Code) | | Create a Lucene Document instance with the given document ID and text.
Parameters: id - the document ID Parameters: text - the text the Document should contain a new Lucene Document instance |
getMatchingTuple | protected Tuple getMatchingTuple(Document d)(Code) | | Return the Tuple matching the given Lucene Document, if any.
Parameters: d - the Document to lookup. the matching Tuple, or null if none. |
getQuery | public String getQuery()(Code) | | Returns the current search query, if any.
the currently active search query |
getTupleMap | public IntObjectHashMap getTupleMap()(Code) | | Returns a copy of the mapping from Lucene document IDs to prefuse Tuple instances.
a copy of the map from lucene doc IDs to prefuse Tuples. |
search | public void search(String query)(Code) | | Searches the indexed Tuple fields for matching keywords, using
the Lucene search engine. Matching Tuples are available as the
members of this TupleSet.
Parameters: query - the query string to search for |
|
|