Skip to main content

<a id=“SuperOffice_WebApi_Agents_FreeTextAgent”></a> Class FreeTextAgent

Namespace: SuperOffice.WebApi.Agents
Assembly: SuperOffice.WebApi.dll
This agent can be used to manage the free text system

Inheritance

objectAgentBaseFreeTextAgent

Implements

IFreeTextAgent, IAgentBase, IDisposable

Inherited Members

AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T&gt;(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()

Examples

<pre><code class=“lang-csharp”>using SuperOffice.WebApi; using SuperOffice.WebApi.Agents; var mySession = new WebApiOptions(“http://example.com/super/api”); mySession.Authorization = new AuthorizationUsernamePassword(“user”, “pass”); using (FreeTextAgent agent = new FreeTextAgent(mySession)) { // call methods on agent here… }</code></pre>

Constructors

<a id=“SuperOffice_WebApi_Agents_FreeTextAgent__ctor_System_Net_Http_HttpClient_”></a> FreeTextAgent(HttpClient)

Constructor: This agent can be used to manage the free text system

Parameters

httpClient HttpClient Use this HTTP client instead of making own HttpClient instance.

<a id=“SuperOffice_WebApi_Agents_FreeTextAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> FreeTextAgent(WebApiOptions, HttpClient)

Constructor: This agent can be used to manage the free text system

Parameters

options WebApiOptions Base URL and authentication values. httpClient HttpClient Optional: Use this HTTP client instead of making a new one.

Methods

<a id=“SuperOffice_WebApi_Agents_FreeTextAgent_FreetextIndexRowsAsync_System_String_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> FreetextIndexRowsAsync(string, int[], RequestOptions)

Update the freetext index for one or more rows from the same table

Parameters

tableName string The name of the table the rows come from; this table should have at least one freetext-indexable field iDs int[] One or more primary keys, identifying records to be (re)indexed. It doesn’t matter if they have been indexed before or not requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

<a id=“SuperOffice_WebApi_Agents_FreeTextAgent_GetStatusAsync_SuperOffice_WebApi_RequestOptions_”></a> GetStatusAsync(RequestOptions)

Returns status for the freetext search words

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<FreeText&gt; The freetext status

<a id=“SuperOffice_WebApi_Agents_FreeTextAgent_RegenerateIndexAsync_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> RegenerateIndexAsync(bool, RequestOptions)

Wipe and regenerate the freetext index by scanning the database (freetext search will be unavailable while this operation runs

Parameters

runAsBatch bool If true, then execute the regeneration as a Batch Task; the service call will return immediately. Otherwise wait until the task completes, may cause a timeout if called as a Web Service requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<BatchTaskInfo&gt; Information about the batch task, if batch execution was requested. Otherwise null

<a id=“SuperOffice_WebApi_Agents_FreeTextAgent_SetEnabledAsync_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> SetEnabledAsync(bool, RequestOptions)

Sets freetext search to enabled (true) or disabled (false)

Parameters

enabled bool If enabled true, else false requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

<a id=“SuperOffice_WebApi_Agents_FreeTextAgent_SetMultiWordOperatorAsync_SuperOffice_WebApi_Data_FreeTextOperator_SuperOffice_WebApi_RequestOptions_”></a> SetMultiWordOperatorAsync(FreeTextOperator, RequestOptions)

Sets the operator used when matching multiple words

Parameters

freeTextOperator FreeTextOperator The operator requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task No return value

<a id=“SuperOffice_WebApi_Agents_FreeTextAgent_SetSingleWordOperatorAsync_SuperOffice_WebApi_Data_FreeTextOperator_SuperOffice_WebApi_RequestOptions_”></a> SetSingleWordOperatorAsync(FreeTextOperator, RequestOptions)

Sets the operator used when matching single words

Parameters

freeTextOperator FreeTextOperator The operator requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value