Class FreeTextAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll This agent can be used to manage the free text system
Inheritance
object ← AgentBase ← FreeTextAgentImplements
IFreeTextAgent, IAgentBase, IDisposableInherited 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>(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
FreeTextAgent(HttpClient)
Constructor: This agent can be used to manage the free text systemParameters
httpClient HttpClient
Use this HTTP client instead of making own HttpClient instance.
FreeTextAgent(WebApiOptions, HttpClient)
Constructor: This agent can be used to manage the free text systemParameters
options WebApiOptions
Base URL and authentication values.
httpClient HttpClient
Optional: Use this HTTP client instead of making a new one.
Methods
FreetextIndexRowsAsync(string, int[], RequestOptions)
Update the freetext index for one or more rows from the same tableParameters
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 valueGetStatusAsync(RequestOptions)
Returns status for the freetext search wordsParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<FreeText> The freetext statusRegenerateIndexAsync(bool, RequestOptions)
Wipe and regenerate the freetext index by scanning the database (freetext search will be unavailable while this operation runsParameters
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> Information about the batch task, if batch execution was requested. Otherwise nullSetEnabledAsync(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 valueSetMultiWordOperatorAsync(FreeTextOperator, RequestOptions)
Sets the operator used when matching multiple wordsParameters
freeTextOperator FreeTextOperator
The operator
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task No return valueSetSingleWordOperatorAsync(FreeTextOperator, RequestOptions)
Sets the operator used when matching single wordsParameters
freeTextOperator FreeTextOperator
The operator
requestOptions RequestOptions
Override language/culture codes on this request.