C# Class DBreeze.TextSearch.TextSearchHandler

New instance per transaction. Is created by necessity, while inserting or selecting anything concerning TextSearch subsystem.
Show file Open project: hhblaze/DBreeze

Public Properties

Property Type Description
InsertWasPerformed bool

Public Methods

Method Description
AfterCommit ( ) : void

Started only in case if InsertWasPerformed in deffered or not deffered way

BeforeCommit ( ) : void

Started only in case if InsertWasPerformed in deffered or not deffered way

GetDocumentsSearchables ( Transaction tran, string tableName, HashSet documentIDs ) : HashSet>.Dictionary

InsertDocumentText ( Transaction tran, string tableName, byte documentId, string containsWords, string fullMatchWords, bool deferredIndexing, int containsMinimalLength, eInsertMode iMode ) : void

TextSearchHandler ( Transaction tran ) : System

Private Methods

Method Description
DoIndexing ( Transaction itran, ITS>.Dictionary xitbls ) : void

itbls and transaction must be supplied, to make it working from outside

GetByteArrayFromSearchbles ( string searchables ) : byte[]

Converter from searchbales to byte[]

GetSearchablesFromByteArray ( byte searchables ) : string

Converter from byte[] searchables.

GetSearchablesFromByteArray_AsHashSet ( byte searchables ) : HashSet

GetWordsDefinitionFromText ( string containsWords, string fullMatchWords, int containsMinimalLength ) : WordDefinition>.SortedDictionary

Returns null in case of notfound anything or what ever

WordsDiff ( byte oldtext, byte newtext ) : HashSet>.Tuple

This function accepts old value of searchables for one document and new value, decides what must be Removed (par1) and what should be Added (par2)

Method Details

AfterCommit() public method

Started only in case if InsertWasPerformed in deffered or not deffered way
public AfterCommit ( ) : void
return void

BeforeCommit() public method

Started only in case if InsertWasPerformed in deffered or not deffered way
public BeforeCommit ( ) : void
return void

GetDocumentsSearchables() public method

public GetDocumentsSearchables ( Transaction tran, string tableName, HashSet documentIDs ) : HashSet>.Dictionary
tran Transaction
tableName string
documentIDs HashSet
return HashSet>.Dictionary

InsertDocumentText() public method

public InsertDocumentText ( Transaction tran, string tableName, byte documentId, string containsWords, string fullMatchWords, bool deferredIndexing, int containsMinimalLength, eInsertMode iMode ) : void
tran Transaction
tableName string
documentId byte
containsWords string
fullMatchWords string
deferredIndexing bool
containsMinimalLength int
iMode eInsertMode
return void

TextSearchHandler() public method

public TextSearchHandler ( Transaction tran ) : System
tran Transaction
return System

Property Details

InsertWasPerformed public property

public bool InsertWasPerformed
return bool