Public Types | |
enum | RankMode { RankMode.e_RankNone = 0, RankMode.e_RankHitCountASC = 1, RankMode.e_RankHitCountDESC = 2 } |
Enumeration for ranking mode used for searching results. More... | |
Public Member Functions | |
FullTextSearch () | |
Constructor. | |
FullTextSearch (FullTextSearch other) | |
Constructor, with another FullTextSearch object. | |
bool | IsEmpty () |
Check whether current object is empty or not. More... | |
bool | SearchOf (string match_string, FullTextSearch.RankMode rank_mode, SearchCallback callback) |
Search for specified text among the indexed PDF files. More... | |
void | SetDataBasePath (string path_of_data_base) |
Set a file path as sqlite data base which is used for storing the indexed data. More... | |
Progressive | StartUpdateIndex (DocumentsSource source, PauseCallback pause, bool reupdate) |
Start to update the index of PDF files defined in a DocumentsSource object. More... | |
bool | UpdateIndexWithFilePath (string file_path) |
Update the index result of a specified PDF file. More... | |
This class is used to index some PDF files and then search specified text among these indexed PDF files.
|
strong |
Enumeration for ranking mode used for searching results.
Values of this enumeration should be used alone.
|
inline |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
|
inline |
Search for specified text among the indexed PDF files.
This function can be used to search among several PDF files, which have been indexed by function FullTextSearch::StartUpdateIndex or FullTextSearch::UpdateIndexWithFilePath. The searching result will be returned through callback function SearchCallback::RetrieveSearchResult, in specified ranking mode.
match_string | A string to be searched. It should not be an empty string. |
rank_mode | The ranking mode used for searching results. Please refer to e_RankXXX values and it should be one of these values. |
callback | A SearchCallback object. It should not be null. User should implement it and use it to retrieve the searching results. |
|
inline |
Set a file path as sqlite data base which is used for storing the indexed data.
This function is only useful before updating the index of PDF files for the first time by function FullTextSearch::StartUpdateIndex or FullTextSearch::UpdateIndexWithFilePath. Once the updating has been done, this function will be useless.
If this function has never called for current FullTextSearch object successfully, the default file for sqlite data would be named as "fts.db" and located with application file.
path_of_data_base | A file path to specify a file as sqlite data base. It should not be an empty string. |
|
inline |
Start to update the index of PDF files defined in a DocumentsSource object.
It may take a long time to do this updating, so Foxit PDF SDK uses a progressive process to do this.
Only PDF files under the specified directory (including sub-directory) defined in DocumentsSource can be indexed.
source | A DocumentsSource object, which defines a directory to be indexed. |
pause | Pause callback object which decides if the updating process needs to be paused. This can be null which means not to pause during the updating process. If this is not null, it should be a valid pause object implemented by user. |
reupdate | true means to re-update the indexes, and false means not to re-update the indexes. |
|
inline |
Update the index result of a specified PDF file.
This function can be used to update the index result of a single PDF file.
file_path | An existed PDF file path. It should not be an empty string. |