C# Class WikiCalendar.IndexMaker

Class is used for index making and index reading. Once index is made its not neccesarry to make it again with new run of application. It will read previously made index.
ファイルを表示 Open project: irfiit/wikipedia Class Usage Examples

Public Methods

Method Description
Index ( string>.Dictionary txtIdPairToBeIndexed ) : int

This method indexes the content that is sent across to it. Each piece of content (or "document") that is indexed has to have a unique identifier (so that the caller can take action based on the document id). Therefore, this method accepts key-value pairs in the form of a dictionary. The key is a ulong which uniquely identifies the string to be indexed. The string itself is the value within the dictionary for that key. Be aware that stop words (like the, this, at, etc.) are _not_ indexed.

IndexMaker ( string indexDir, string fieldName ) : Lucene.Net.Analysis
Search ( string searchTerm, long &ids, string &results ) : void

This method searches for the search term passed by the caller.

Method Details

Index() public method

This method indexes the content that is sent across to it. Each piece of content (or "document") that is indexed has to have a unique identifier (so that the caller can take action based on the document id). Therefore, this method accepts key-value pairs in the form of a dictionary. The key is a ulong which uniquely identifies the string to be indexed. The string itself is the value within the dictionary for that key. Be aware that stop words (like the, this, at, etc.) are _not_ indexed.
public Index ( string>.Dictionary txtIdPairToBeIndexed ) : int
txtIdPairToBeIndexed string>.Dictionary A dictionary of key-value pairs that are sent by the caller /// to uniquely identify each string that is to be indexed.
return int

IndexMaker() public method

public IndexMaker ( string indexDir, string fieldName ) : Lucene.Net.Analysis
indexDir string
fieldName string
return Lucene.Net.Analysis

Search() public method

This method searches for the search term passed by the caller.
public Search ( string searchTerm, long &ids, string &results ) : void
searchTerm string The search term as a string that the caller wants to search for within the /// index as referenced by this object.
ids long An out parameter that is populated by this method for the caller with docments ids.
results string An out parameter that is populated by this method for the caller with docments text.
return void