C# Class MongoSearch.Repository

ファイルを表示 Open project: LittleLin/MongoSearch Class Usage Examples

Public Methods

Method Description
AddDocument ( SourceDocument srcDoc ) : System.Boolean

加入單一文件,建索引

AddDocument ( String jsonDoc ) : System.Boolean

加入單一文件,建索引 (JSON)

AddDocuments ( IEnumerable srcDocs ) : System.Boolean

批次加入文件、建索引

AddDocuments ( String jsonDocs ) : System.Boolean

批次加入文件、建索引 (JSON)

MakeIndex ( ) : bool

建索引主體

Repository ( Indexer indexer, String name ) : System
Search ( String keyword, int fetchSize ) : SearchResult

搜尋主體

Search ( String keyword, int startPos, int fetchSize ) : SearchResult

搜尋主體

Private Methods

Method Description
ParseSourceDoc ( ) : bool

解析原始文件,存人 MongoDB 中

Method Details

AddDocument() public method

加入單一文件,建索引
public AddDocument ( SourceDocument srcDoc ) : System.Boolean
srcDoc MongoSearch.Structure.SourceDocument
return System.Boolean

AddDocument() public method

加入單一文件,建索引 (JSON)
public AddDocument ( String jsonDoc ) : System.Boolean
jsonDoc String
return System.Boolean

AddDocuments() public method

批次加入文件、建索引
public AddDocuments ( IEnumerable srcDocs ) : System.Boolean
srcDocs IEnumerable
return System.Boolean

AddDocuments() public method

批次加入文件、建索引 (JSON)
public AddDocuments ( String jsonDocs ) : System.Boolean
jsonDocs String
return System.Boolean

MakeIndex() public method

建索引主體
public MakeIndex ( ) : bool
return bool

Repository() public method

public Repository ( Indexer indexer, String name ) : System
indexer Indexer
name String
return System

Search() public method

搜尋主體
public Search ( String keyword, int fetchSize ) : SearchResult
keyword String
fetchSize int
return MongoSearch.Structure.SearchResult

Search() public method

搜尋主體
public Search ( String keyword, int startPos, int fetchSize ) : SearchResult
keyword String
startPos int
fetchSize int
return MongoSearch.Structure.SearchResult