Package org.eclipse.help.search
Interface ISearchDocument
public interface ISearchDocument
Represents a document in the search index. This interface is used by
clients which implement the search participant extension point. While the
help system uses the Lucene classes internally this interface does not
import anything from Lucene and enables the API for adding search participants
to remain binary compatible whatever changes are made in Lucene.
- Since:
- 3.5
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addContents
(Reader contents, Reader exactContents) Alternate way of adding contents which is closer to the API for the deprecated extension point org.eclipse.help.base.luceneSearchParticipants.void
addContents
(String contents) void
setHasFilters
(boolean hasFilters) Allows search participant to indicate that a document will be processed at runtime and that parts of the contents may not be displayed to the user, causing a match in the search to be shown as a potential match.void
setSummary
(String summary) void
-
Method Details
-
setTitle
- Parameters:
title
- the title which will be shown in the search results summary. This function should be called exactly once per document
-
setSummary
- Parameters:
summary
- the summary which will be used when displaying search results. This function should be called exactly once per document
-
addContents
- Parameters:
contents
- the text which will be used when performing a search. The search index will parse the contents and store the results in a database for rapid retrieval.
-
addContents
Alternate way of adding contents which is closer to the API for the deprecated extension point org.eclipse.help.base.luceneSearchParticipants. This is provided for backward compatibility, most users will find it simpler to useaddContents(String)
- Parameters:
contents
- a Reader object which provides the contentsexactContents
- a second Reader object which contains the same same contents
-
setHasFilters
void setHasFilters(boolean hasFilters) Allows search participant to indicate that a document will be processed at runtime and that parts of the contents may not be displayed to the user, causing a match in the search to be shown as a potential match. By default documents are considered to be unfiltered so this function need only be called to indicate that a document is filtered
-