ImageGear .NET v25.1 - Updated
IPCCSearch-Proximity
API Reference > ViewerControl API > IPCCSearch-Proximity

Namespace: Proximity

IPCCSearch~Proximity

ImageGear.Web Proximity Search

Methods

(static) getResults Search a string of text for the given terms within the given distance of eachother.(text, searchTerms, distance) → {Array.<SearchResult>}

Parameters:
Name Type Description
text string The text to be searched by the proximity search.
searchTerms Array.<RegExp> An array of regular expressions used to search the text. The regular expression are expected to be something like /word/gim so that the search is global, ignores case and matches across linebreaks.
distance integer The maximum number of words within which individual search term results must appear for them to be considered a proximity search result.
Returns:
An array of search results for the given search.
Type
Array.<SearchResult>

(static) getWordIndex Get an array of integers which each represents the starting index of a word within the text.(text) → {Array.<integer>}

Parameters:
Name Type Description
text string The text to get word indices from.
Returns:
An array of word indices.
Type
Array.<integer>