Class NSFreeTextAgent

This agent can be used to manage the free text system.

Examples

NSFreeTextAgent agent;
agent.callMethod(arg1, arg2);

Constructors

NSFreeTextAgent()

This agent can be used to manage the free text system.

Declaration

NSFreeTextAgent

Examples

NSFreeTextAgent agent;
agent.callMethod(arg1, arg2);

Methods

AddWords(String)

Adds the words in the string to the stop word list

Declaration

Void AddWords(String stopWords)

Examples

NSFreeTextAgent agent;
String stopWords;
agent.AddWords(stopWords);

Parameters

Type Name Description
String stopWords

Returns

Type Description
Void

DeleteStopWordsById(Integer[])

Deletes the stop words with these IDs

Declaration

Void DeleteStopWordsById(Integer[] stopWordIds)

Examples

NSFreeTextAgent agent;
Integer[] stopWordIds;
agent.DeleteStopWordsById(stopWordIds);

Parameters

Type Name Description
Integer[] stopWordIds

Returns

Type Description
Void

GetStatus()

Returns status for the free-text search words

Declaration

NSFreeText GetStatus()

Examples

NSFreeTextAgent agent;
NSFreeText res = agent.GetStatus();

Returns

Type Description
NSFreeText

GetStopWordList()

Returns the list of stop words

Declaration

String[] GetStopWordList()

Examples

NSFreeTextAgent agent;
String[] res = agent.GetStopWordList();

Returns

Type Description
String[] list of stop words.

GetSuggestedStopWords(Integer)

Returns the top used words in the free-text index table, sorted as most used first

Declaration

NSMDOListItem[] GetSuggestedStopWords(Integer countWords)

Examples

NSFreeTextAgent agent;
Integer countWords;
NSMDOListItem[] res = agent.GetSuggestedStopWords(countWords);

Parameters

Type Name Description
Integer countWords

Returns

Type Description
NSMDOListItem[]

RegenerateIndex(Bool)

Wipes and regenerates the free-text index by scanning the database (free-text search will be unavailable while this operation runs

Declaration

NSBatchTaskInfo RegenerateIndex(Bool runAsBatch)

Examples

NSFreeTextAgent agent;
Bool runAsBatch;
NSBatchTaskInfo res = agent.RegenerateIndex(runAsBatch);

Parameters

Type Name Description
Bool runAsBatch

Returns

Type Description
NSBatchTaskInfo

SetAutoEnableTravelAreas(Bool)

Declaration

Void SetAutoEnableTravelAreas(Bool autoEnable)

Examples

NSFreeTextAgent agent;
Bool autoEnable;
agent.SetAutoEnableTravelAreas(autoEnable);

Parameters

Type Name Description
Bool autoEnable Automatically enable free-text search for new travel areas? true or false.

Returns

Type Description
Void

SetEnabled(Bool)

Sets free-text search to enabled (true) or disabled (false)

Declaration

Void SetEnabled(Bool enabled)

Examples

NSFreeTextAgent agent;
Bool enabled;
agent.SetEnabled(enabled);

Parameters

Type Name Description
Bool enabled

Returns

Type Description
Void

SetMultiWordOperator(Integer)

Sets the operator used when matching multiple words

Declaration

Void SetMultiWordOperator(Integer freeTextOperator)

Examples

NSFreeTextAgent agent;
Integer freeTextOperator;
agent.SetMultiWordOperator(freeTextOperator);

Parameters

Type Name Description
Integer freeTextOperator See <xref href="CRMScript.NetServer.FreeTextOperator" data-throw-if-not-resolved="false"></xref>.

Returns

Type Description
Void

SetSingleWordOperator(Integer)

Sets the operator used when matching single words

Declaration

Void SetSingleWordOperator(Integer freeTextOperator)

Examples

NSFreeTextAgent agent;
Integer freeTextOperator;
agent.SetSingleWordOperator(freeTextOperator);

Parameters

Type Name Description
Integer freeTextOperator See <xref href="CRMScript.NetServer.FreeTextOperator" data-throw-if-not-resolved="false"></xref>.

Returns

Type Description
Void