Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
com.foxit.sdk.SearchOption Class Reference

## Public Member Functions
| SearchOption ()
| Constructor.
| SearchOption (boolean is_whole_word, boolean is_case_sensitive, boolean is_search_bookmarks, boolean is_search_in_marup, boolean is_search_in_attachments, boolean is_ignore_accents, boolean is_proximity, boolean is_stemming, boolean is_ignore_full_width, int max_docs, int word_matching, boolean is_search_doc_text)
| Constructor, with parameters. More...
| SearchOption (SearchOption search_option)
| Constructor, with another search option object. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
boolean | getIs_case_sensitive ()
| Get specifies whether the search query is case sensitive. More...
boolean | getIs_ignore_accents ()
| Get specifies whether accents and diacriticals are ignored while searching the query term. More...
boolean | getIs_ignore_full_width ()
| Get specifies whether full width and half width characters in the document exactly match the search query. More...
boolean | getIs_proximity ()
| Get specifies whether the search query will reflect the proximity of words in the results ranking when performing the search that contains AND Boolean clauses. More...
boolean | getIs_search_bookmarks ()
| Get specifies whether bookmarks are searched for the query. More...
boolean | getIs_search_doc_text ()
| Get specifies whether the document text is searched for the query. More...
boolean | getIs_search_in_attachments ()
| Get specifies whether any PDF file attachments should be searched along with the base document. More...
boolean | getIs_search_in_markup ()
| Get specifies whether markup (annotations) are searched for the query. More...
boolean | getIs_stemming ()
| Get specifies whether the search query will take the stemming of words (for example, run, runs, running) into account when performing the search. More...
boolean | getIs_whole_word ()
| Get specifies whether search finds only occurrences of complete words that are specified in the query. More...
int | getMax_docs ()
| Get the maximum number of documents that will be returned as part of the search query. More...
int | getWord_matching ()
| Get how individual words in the query will be matched to words in the document. More...
void | set (boolean is_whole_word, boolean is_case_sensitive, boolean is_search_bookmarks, boolean is_search_in_marup, boolean is_search_in_attachments, boolean is_ignore_accents, boolean is_proximity, boolean is_stemming, boolean is_ignore_full_width, int max_docs, int word_matching, boolean is_search_doc_text)
| Set values. More...
void | setIs_case_sensitive (boolean value)
| Set specifies whether the search query is case sensitive. More...
void | setIs_ignore_accents (boolean value)
| Set specifies whether accents and diacriticals are ignored while searching the query term. More...
void | setIs_ignore_full_width (boolean value)
| Set specifies whether full width and half width characters in the document exactly match the search query. More...
void | setIs_proximity (boolean value)
| Set specifies whether the search query will reflect the proximity of words in the results ranking when performing the search that contains AND Boolean clauses. More...
void | setIs_search_bookmarks (boolean value)
| Set specifies whether bookmarks are searched for the query. More...
void | setIs_search_doc_text (boolean value)
| Set specifies whether the document text is searched for the query. More...
void | setIs_search_in_attachments (boolean value)
| Set specifies whether any PDF file attachments should be searched along with the base document. More...
void | setIs_search_in_markup (boolean value)
| Set specifies whether markup (annotations) are searched for the query. More...
void | setIs_stemming (boolean value)
| Set specifies whether the search query will take the stemming of words (for example, run, runs, running) into account when performing the search. More...
void | setIs_whole_word (boolean value)
| Set specifies whether search finds only occurrences of complete words that are specified in the query. More...
void | setMax_docs (int value)
| Set the maximum number of documents that will be returned as part of the search query. More...
void | setWord_matching (int value)
| Set how individual words in the query will be matched to words in the document. More...

## Static Public Attributes
static final int | e_WordMatchingMatchAllWords = 1
| Word matching: match all words.
static final int | e_WordMatchingMatchAnyWord = 2
| Word matching: match any word.
static final int | e_WordMatchingMatchPhrase = 0
| Word matching: match phrase.

## Detailed Description

This class represents search option.

## Constructor & Destructor Documentation

## ◆ SearchOption() [1/2]

com.foxit.sdk.SearchOption.SearchOption | ( | boolean | is_whole_word,
|  | boolean | is_case_sensitive,
|  | boolean | is_search_bookmarks,
|  | boolean | is_search_in_marup,
|  | boolean | is_search_in_attachments,
|  | boolean | is_ignore_accents,
|  | boolean | is_proximity,
|  | boolean | is_stemming,
|  | boolean | is_ignore_full_width,
|  | int | max_docs,
|  | int | word_matching,
|  | boolean | is_search_doc_text
| ) |  |

Constructor, with parameters.

Parameters

  [in] | is_whole_word | Specifies whether search finds only occurrences of complete words that are specified in the query.
  [in] | is_case_sensitive | Specifies whether the search query is case sensitive.
  [in] | is_search_bookmarks | Specifies whether bookmarks are searched for the query.
  [in] | is_search_in_attachments | Specifies whether any PDF file attachments should be searched along with the base document.
  [in] | is_ignore_accents | Specifies whether accents and diacriticals are ignored while searching the query term.
  [in] | is_proximity | Specifies whether the search query will reflect the proximity of words in the results ranking when performing the search that contains AND Boolean clauses.
  [in] | is_stemming | Specifies whether the search query will take the stemming of words (for example, run, runs, running) into account when performing the search.
  [in] | is_ignore_full_width | Specifies whether full width and half width characters in the document exactly match the search query.
  [in] | max_docs | The maximum number of documents that will be returned as part of the search query.
  [in] | word_matching | How individual words in the query will be matched to words in the document.
  [in] | is_search_doc_text | Specifies whether the document text is searched for the query.

## ◆ SearchOption() [2/2]

com.foxit.sdk.SearchOption.SearchOption | ( | SearchOption | search_option | ) |

Constructor, with another search option object.

Parameters

  [in] | search_option | Another search option object.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.SearchOption.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

## ◆ getIs_case_sensitive()

com.foxit.sdk.SearchOption.getIs_case_sensitive | ( |  | ) |

Get specifies whether the search query is case sensitive.

Returns
  Specifies whether the search query is case sensitive. Defaule value: false.

## ◆ getIs_ignore_accents()

com.foxit.sdk.SearchOption.getIs_ignore_accents | ( |  | ) |

Get specifies whether accents and diacriticals are ignored while searching the query term.

Returns
  Specifies whether accents and diacriticals are ignored while searching the query term. Defaule value: false.

## ◆ getIs_ignore_full_width()

com.foxit.sdk.SearchOption.getIs_ignore_full_width | ( |  | ) |

Get specifies whether full width and half width characters in the document exactly match the search query.

Returns
  Specifies whether full width and half width characters in the document exactly match the search query. true means ignore full width and half width matching, while false means exactly match the search query. Defaule value: false.

## ◆ getIs_proximity()

com.foxit.sdk.SearchOption.getIs_proximity | ( |  | ) |

Get specifies whether the search query will reflect the proximity of words in the results ranking when performing the search that contains AND Boolean clauses.

Returns
  Specifies whether the search query will reflect the proximity of words in the results ranking when performing the search that contains AND Boolean clauses. Defaule value: false.

## ◆ getIs_search_bookmarks()

com.foxit.sdk.SearchOption.getIs_search_bookmarks | ( |  | ) |

Get specifies whether bookmarks are searched for the query.

Returns
  Specifies whether bookmarks are searched for the query. Defaule value: false.

## ◆ getIs_search_doc_text()

com.foxit.sdk.SearchOption.getIs_search_doc_text | ( |  | ) |

Get specifies whether the document text is searched for the query.

Returns
  Specifies whether the document text is searched for the query. Defaule value: true.

## ◆ getIs_search_in_attachments()

com.foxit.sdk.SearchOption.getIs_search_in_attachments | ( |  | ) |

Get specifies whether any PDF file attachments should be searched along with the base document.

Returns
  Specifies whether any PDF file attachments should be searched along with the base document. Defaule value: false.

## ◆ getIs_search_in_markup()

com.foxit.sdk.SearchOption.getIs_search_in_markup | ( |  | ) |

Get specifies whether markup (annotations) are searched for the query.

Returns
  Specifies whether markup (annotations) are searched for the query. Defaule value: false.

## ◆ getIs_stemming()

com.foxit.sdk.SearchOption.getIs_stemming | ( |  | ) |

Get specifies whether the search query will take the stemming of words (for example, run, runs, running) into account when performing the search.

Returns
  Specifies whether the search query will take the stemming of words (for example, run, runs, running) into account when performing the search. Defaule value: false.

## ◆ getIs_whole_word()

com.foxit.sdk.SearchOption.getIs_whole_word | ( |  | ) |

Get specifies whether search finds only occurrences of complete words that are specified in the query.

Returns
  Specifies whether search finds only occurrences of complete words that are specified in the query. Defaule value: false.

## ◆ getMax_docs()

com.foxit.sdk.SearchOption.getMax_docs | ( |  | ) |

Get the maximum number of documents that will be returned as part of the search query.

Returns
  The maximum number of documents that will be returned as part of the search query. Defaule value: 100.

## ◆ getWord_matching()

com.foxit.sdk.SearchOption.getWord_matching | ( |  | ) |

Get how individual words in the query will be matched to words in the document.

Returns
  How individual words in the query will be matched to words in the document. This property is relevant only when a query has more than one word. Please refer to values starting from com.foxit.sdk.SearchOption.e_WordMatchingMatchPhrase and this should be one of these values.

## ◆ set()

void com.foxit.sdk.SearchOption.set | ( | boolean | is_whole_word,
|  | boolean | is_case_sensitive,
|  | boolean | is_search_bookmarks,
|  | boolean | is_search_in_marup,
|  | boolean | is_search_in_attachments,
|  | boolean | is_ignore_accents,
|  | boolean | is_proximity,
|  | boolean | is_stemming,
|  | boolean | is_ignore_full_width,
|  | int | max_docs,
|  | int | word_matching,
|  | boolean | is_search_doc_text
| ) |  |

Set values.

Parameters

  [in] | is_whole_word | Specifies whether search finds only occurrences of complete words that are specified in the query.
  [in] | is_case_sensitive | Specifies whether the search query is case sensitive.
  [in] | is_search_bookmarks | Specifies whether bookmarks are searched for the query.
  [in] | is_search_in_attachments | Specifies whether any PDF file attachments should be searched along with the base document.
  [in] | is_ignore_accents | Specifies whether accents and diacriticals are ignored while searching the query term.
  [in] | is_proximity | Specifies whether the search query will reflect the proximity of words in the results ranking when performing the search that contains AND Boolean clauses.
  [in] | is_stemming | Specifies whether the search query will take the stemming of words (for example, run, runs, running) into account when performing the search.
  [in] | is_ignore_full_width | Specifies whether full width and half width characters in the document exactly match the search query.
  [in] | max_docs | The maximum number of documents that will be returned as part of the search query.
  [in] | word_matching | How individual words in the query will be matched to words in the document.
  [in] | is_search_doc_text | Specifies whether the document text is searched for the query.

Returns
  None.

## ◆ setIs_case_sensitive()

com.foxit.sdk.SearchOption.setIs_case_sensitive | ( | boolean | value | ) |

Set specifies whether the search query is case sensitive.

Parameters

  [in] | value | Specifies whether the search query is case sensitive. Defaule value: false.

Returns
  None.

## ◆ setIs_ignore_accents()

com.foxit.sdk.SearchOption.setIs_ignore_accents | ( | boolean | value | ) |

Set specifies whether accents and diacriticals are ignored while searching the query term.

Parameters

  [in] | value | Specifies whether accents and diacriticals are ignored while searching the query term. Defaule value: false.

Returns
  None.

## ◆ setIs_ignore_full_width()

com.foxit.sdk.SearchOption.setIs_ignore_full_width | ( | boolean | value | ) |

Set specifies whether full width and half width characters in the document exactly match the search query.

Parameters

  [in] | value | Specifies whether full width and half width characters in the document exactly match the search query. true means ignore full width and half width matching, while false means exactly match the search query. Defaule value: false.

Returns
  None.

## ◆ setIs_proximity()

com.foxit.sdk.SearchOption.setIs_proximity | ( | boolean | value | ) |

Set specifies whether the search query will reflect the proximity of words in the results ranking when performing the search that contains AND Boolean clauses.

Parameters

  [in] | value | Specifies whether the search query will reflect the proximity of words in the results ranking when performing the search that contains AND Boolean clauses. Defaule value: false.

Returns
  None.

## ◆ setIs_search_bookmarks()

com.foxit.sdk.SearchOption.setIs_search_bookmarks | ( | boolean | value | ) |

Set specifies whether bookmarks are searched for the query.

Parameters

  [in] | value | Specifies whether bookmarks are searched for the query. Defaule value: false.

Returns
  None.

## ◆ setIs_search_doc_text()

com.foxit.sdk.SearchOption.setIs_search_doc_text | ( | boolean | value | ) |

Set specifies whether the document text is searched for the query.

Parameters

  [in] | value | Specifies whether the document text is searched for the query. Defaule value: true.

Returns
  None.

## ◆ setIs_search_in_attachments()

com.foxit.sdk.SearchOption.setIs_search_in_attachments | ( | boolean | value | ) |

Set specifies whether any PDF file attachments should be searched along with the base document.

Parameters

  [in] | value | Specifies whether any PDF file attachments should be searched along with the base document. Defaule value: false.

Returns
  None.

## ◆ setIs_search_in_markup()

com.foxit.sdk.SearchOption.setIs_search_in_markup | ( | boolean | value | ) |

Set specifies whether markup (annotations) are searched for the query.

Parameters

  [in] | value | Specifies whether markup (annotations) are searched for the query. Defaule value: false.

Returns
  None.

## ◆ setIs_stemming()

com.foxit.sdk.SearchOption.setIs_stemming | ( | boolean | value | ) |

Set specifies whether the search query will take the stemming of words (for example, run, runs, running) into account when performing the search.

Parameters

  [in] | value | Specifies whether the search query will take the stemming of words (for example, run, runs, running) into account when performing the search. Defaule value: false.

Returns
  None.

## ◆ setIs_whole_word()

com.foxit.sdk.SearchOption.setIs_whole_word | ( | boolean | value | ) |

Set specifies whether search finds only occurrences of complete words that are specified in the query.

Parameters

  [in] | value | Specifies whether search finds only occurrences of complete words that are specified in the query. Defaule value: false.

Returns
  None.

## ◆ setMax_docs()

com.foxit.sdk.SearchOption.setMax_docs | ( | int | value | ) |

Set the maximum number of documents that will be returned as part of the search query.

Parameters

  [in] | value | The maximum number of documents that will be returned as part of the search query. Defaule value: 100.

Returns
  None.

## ◆ setWord_matching()

com.foxit.sdk.SearchOption.setWord_matching | ( | int | value | ) |

Set how individual words in the query will be matched to words in the document.

Parameters

  [in] | value | How individual words in the query will be matched to words in the document. This property is relevant only when a query has more than one word. Please refer to values starting from com.foxit.sdk.SearchOption.e_WordMatchingMatchPhrase and this should be one of these values.

Returns
  None.