Foxit PDF SDK
|
Instance Methods | |
(id) | - init |
Constructor. | |
(id) | - initWithOther: |
Constructor, with another full text search object. More... | |
(BOOL) | - isEmpty |
Check whether current object is empty or not. More... | |
(BOOL) | - searchOf:rank_mode:callback: |
Search for specified text among the indexed PDF files. More... | |
(void) | - setDataBasePath: |
Set a file path as sqlite data base which is used for storing the indexed data. More... | |
(FSProgressive *) | - startUpdateIndex:pause:reupdate: |
Start to update the index of PDF files defined in a documents source object. More... | |
(BOOL) | - updateIndexWithFilePath: |
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.
- (id) initWithOther: | (FSFullTextSearch*) | other |
Constructor, with another full text search object.
[in] | other | Another full text search object. |
- (BOOL) isEmpty |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
- (BOOL) searchOf: | (NSString *) | match_string | |
rank_mode: | (FSFullTextSearchRankMode) | rank_mode | |
callback: | (id<FSSearchCallback>) | callback | |
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 FSFullTextSearch::startUpdateIndex:pause:reupdate: or FSFullTextSearch::updateIndexWithFilePath:. The searching result will be returned through callback function FSSearchCallback::retrieveSearchResult:page_index:match_result:match_start_text_index:match_end_text_index:, in specified ranking mode.
[in] | match_string | A string to be searched. It should not be an empty string and should be UTF-8 encoding. |
[in] | rank_mode | The ranking mode used for searching results. Please refer to values starting from FSFullTextSearchRankNone and this should be one of these values. |
[in] | callback | A object. It should not be nil. User should implement it and use it to retrieve the searching results. |
- (void) setDataBasePath: | (NSString *) | path_of_data_base |
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 FSFullTextSearch::startUpdateIndex:pause:reupdate: or FSFullTextSearch::updateIndexWithFilePath:. Once the updating has been done, this function will be useless.
If this function has never called for current full text search object successfully, the default file for sqlite data would be named as "fts.db" and located with application file.
[in] | path_of_data_base | A file path to specify a file as sqlite data base. It should not be an empty string and should be UTF-8 encoding. |
- (FSProgressive *) startUpdateIndex: | (FSDocumentsSource*) | source | |
pause: | (id<FSPauseCallback>) | pause | |
reupdate: | (BOOL) | reupdate | |
Start to update the index of PDF files defined in a documents source 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 documents source can be indexed. The index of PDF files in the database that are not located in the specified directory (including sub-directory) defined in the document source will be deleted.
[in] | source | A documents source object, which defines a directory to be indexed. |
[in] | pause | Pause callback object which decides if the updating process needs to be paused. This can be nil which means not to pause during the updating process. If this is not nil, it should be a valid pause object implemented by user. |
[in] | reupdate | YES means to re-update the existing index information in the database, and NO means not to re- update the existing index information in the database. |
- (BOOL) updateIndexWithFilePath: | (NSString *) | file_path |
Update the index result of a specified PDF file.
This function can be used to update the index result of a single PDF file.
[in] | file_path | An existed PDF file path. It should not be an empty string and should be UTF-8 encoding. |