C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

Index() публичный Метод

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.
Результат int

IndexMaker() публичный Метод

public IndexMaker ( string indexDir, string fieldName ) : Lucene.Net.Analysis
indexDir string
fieldName string
Результат Lucene.Net.Analysis

Search() публичный Метод

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.
Результат void