C# Class ScrewTurn.Wiki.Plugins.SqlCommon.SqlIndex

Implements a SQL-based search engine index.
Inheritance: IIndex
Mostra file Open project: mono/ScrewTurnWiki

Protected Properties

Property Type Description
stopWords string[]

Public Methods

Method Description
Clear ( object state ) : void

Completely clears the index (stop words are not affected).

RemoveDocument ( IDocument document, object state ) : void

Removes a document from the index.

Search ( SearchParameters parameters ) : SearchResultCollection

Performs a search in the index.

SqlIndex ( IIndexConnector connector ) : System

Initializes a new instance of the T:SqlIndex class.

StoreDocument ( IDocument document, string keywords, string content, object state ) : int

Stores a document in the index.

Indexing the content of the document is O(n), where n is the total number of words in the document.

Method Details

Clear() public method

Completely clears the index (stop words are not affected).
public Clear ( object state ) : void
state object A state object that is passed to the IndexStorer SaveDate/DeleteData function.
return void

RemoveDocument() public method

Removes a document from the index.
public RemoveDocument ( IDocument document, object state ) : void
document IDocument The document to remove.
state object A state object that is passed to the IndexStorer SaveDate/DeleteData function.
return void

Search() public method

Performs a search in the index.
public Search ( SearchParameters parameters ) : SearchResultCollection
parameters ScrewTurn.Wiki.SearchEngine.SearchParameters The search parameters.
return SearchResultCollection

SqlIndex() public method

Initializes a new instance of the T:SqlIndex class.
public SqlIndex ( IIndexConnector connector ) : System
connector IIndexConnector The connection object.
return System

StoreDocument() public method

Stores a document in the index.
Indexing the content of the document is O(n), where n is the total number of words in the document.
public StoreDocument ( IDocument document, string keywords, string content, object state ) : int
document IDocument The document.
keywords string The document keywords, if any, an empty array or null otherwise.
content string The content of the document.
state object A state object that is passed to the IndexStorer SaveDate/DeleteData function.
return int

Property Details

stopWords protected_oe property

The stop words to be used while indexing new content.
protected string[] stopWords
return string[]