S
SS2000
Unregistered / Unconfirmed
GUEST, unregistred user!
不知道大家有没有兴趣?
我想和大家共享,一起完善这个文件全文索引,有兴趣的可给我来信,一起探讨
ccwtt@btamail.net.cn
以下是我的全文索引简单说明
TFullTextIndex = class
private
iIndexFileHandle: integer;
procedure CalculateIndexPos;
function InsertFilePos(CharCode: integer;
FileNo: integer;
Position: integer): Boolean;
function InsertPosition(var PositionList: TList;
Position: integer): Boolean;
function IsTextTogether(Text: string;
FileNo: integer): Boolean;
function ReadOneCharIndex(pCharIndex: PTCharIndex): Boolean;
function ReadOneFileIndex(pCharPosInFile: PTCharPosInFile): Boolean;
function GetCharIndex(CharCode: integer): PTCharIndex;
function GetCharPosition(CharCode: integer;
FileNo: integer): PTCharPosInFile;
function ReadCharIndex: Boolean;
function ReadFileIndex: Boolean;
function SearchChar(CharCode: integer;
var FileNoArray: TFileNoArray): Boolean;
function SearchWord(Word: string;
var FileNoArray: TFileNoArray): Boolean;
public
IndexFileName: string;
FullIndex: TList;
constructor Create(FileName: string='');
destructor Destroy;
override;
procedure FreeIndex;
function ReadAllIndex: Boolean;
//建立索引文件用
function ReadFileToIndex(FileNo: integer;
FileName: string): Boolean;
function WriteIndexToFile: Boolean;
//在索引文件中进行全文检索
function SearchString(Text: string;
var FileNoArray: TFileNoArray): Boolean;
end;
我想和大家共享,一起完善这个文件全文索引,有兴趣的可给我来信,一起探讨
ccwtt@btamail.net.cn
以下是我的全文索引简单说明
TFullTextIndex = class
private
iIndexFileHandle: integer;
procedure CalculateIndexPos;
function InsertFilePos(CharCode: integer;
FileNo: integer;
Position: integer): Boolean;
function InsertPosition(var PositionList: TList;
Position: integer): Boolean;
function IsTextTogether(Text: string;
FileNo: integer): Boolean;
function ReadOneCharIndex(pCharIndex: PTCharIndex): Boolean;
function ReadOneFileIndex(pCharPosInFile: PTCharPosInFile): Boolean;
function GetCharIndex(CharCode: integer): PTCharIndex;
function GetCharPosition(CharCode: integer;
FileNo: integer): PTCharPosInFile;
function ReadCharIndex: Boolean;
function ReadFileIndex: Boolean;
function SearchChar(CharCode: integer;
var FileNoArray: TFileNoArray): Boolean;
function SearchWord(Word: string;
var FileNoArray: TFileNoArray): Boolean;
public
IndexFileName: string;
FullIndex: TList;
constructor Create(FileName: string='');
destructor Destroy;
override;
procedure FreeIndex;
function ReadAllIndex: Boolean;
//建立索引文件用
function ReadFileToIndex(FileNo: integer;
FileName: string): Boolean;
function WriteIndexToFile: Boolean;
//在索引文件中进行全文检索
function SearchString(Text: string;
var FileNoArray: TFileNoArray): Boolean;
end;