Class SY_SearchData_AC

Auto-Complete alternate search using Lucene

Constructor

Initialize a Sage.Data.Search object as alternate for autocomplete

ParameterDescription
coSession [input, object, required] Reference to the SY_Session object
bIgnoreNoData [input, boolean, optional] When set, will skip the check for data in the data index used for the search.
Info

The constructor will fail if the DLL cannot be located or the data index is empty.

Inherits

SY_SearchData

Properties

No Properties

Methods

FUNCTION AdvancedSearch(entityName$, searchIndex)  

Display the Advanced search dialog to enable user to enter search value and view/select results

ParameterDescription
entityName$ [input, string, required] Name for the entity to search
searchIndex [output, number] Index into the search result set of selected row
Returns [boolean] returns retSUCCESS(1)
Entity Names
ValueDescription
Account G/L Accounts
Customer A/R Customers
Employee P/R Employees
Item Item Codes
Vendor A/P Vendors
FUNCTION BuildIndex()  
FUNCTION BuildIndex(company$)  
FUNCTION BuildIndex(company$, entityName$)  
FUNCTION BuildIndex(company$, entityName$, bKeepExisitng)  

Build the data index for the specified enties in company

ParameterDescription
company$ [input, string, optional] Company code for tables to use to create the data for the search index
entityName$ [input, string, optional] A name used to identify the application entity to be associated with the data
bKeepExisting [input, boolean, optional] When set, will not initialize the existing index
Returns [boolean] 0 - Failure, 1 - Success
FUNCTION BuildIndexByCompType(compTypes$)  

Build the data index for all the specified company types.

ParameterDescription
compTypes$ [input, string] Concatenated list of company types to build index for, if blank, then all companies will be built.
Returns [boolean] 0 - Failure, 1 - Success
FUNCTION CheckEntityData(entityName$)  

Check to see if there is any data for the entity

ParameterDescription
entityName$ [input, string, required] Name for the entity to search
Returns [boolean] 0 - No data found, 1 - Data found
FUNCTION GetDataIOL$()  

Get IOList used to create / read the record of data stored in the DocData field in the search index by the BuildIndex() method

Returns [string] IOLIST to use for DocData field in the search Index
FUNCTION GetIndexName$()  

Get name of Index

Returns [string] Name of Index
FUNCTION GetIndexPassword$()  

Get password to use for open of Index

Returns [string] Password value to use for open of Index
FUNCTION GetMlacExpressions(out.DisplayExpr$, out.ReturnExpr$)  

Get expressions to be override Auto-Complete defintion used in *obj/mlac for data display and returned value

ParameterDescription
out.DisplayExpr$ [output, string] Expression to be used to create data value to display in selection list
out.ReturnExpr$ [output, string] Expression to be used to set the data value to be returned for selected row in selection list
Returns [boolean] retSUCCESS(1) when override values are defined, retFAILURE(0) when no override values are defined
Info

This method should be implemented in child class to define IOLIST for data to display to allow for greater flexibility when using Advanced Search

FUNCTION GetResultsFormat$()  

Get format definition to use for the display of the search results in the Report-View of the Advanced Search

Returns [string] Format definition used to display search results in Advanced Search dialog
FUNCTION GetResultsIOL$()  

Get IOList to use for data to load into the Report View when using the Advanced Search

Returns [string] IOLIST to use for data to load into Reort View to display the search results in Advanced Search dialog
FUNCTION GetStoredIOL$()  

Get IOList to use for separating the stored data stored in the DocStored field in the search index into fields.

Returns [string] IOLIST to use for DocStored field in the search Index
Info

This method can be implemented in child class to define IOLIST for data to be stored in the search index but not included as part of a search

FUNCTION GetStoredValue$(entity$, company$, dataRec$, dataIOL$)  

Get data value (not translated) for the DocStored field in the search index

ParameterDescription
entity$ [input, string] A name used to identify the application entity to be associated with the data
company$ [input, string, optional] Company code
dataRec$ [input, string] A string containing the field data values for entity main file record
dataIOL$ [input, string] An IOLIST for entity main file
Returns [string] Stored data record to use for DocStored field in the search Index
Info

This method can be implemented in child class to define the data to be stored in the search index but not included as part of a search. This stored data can be used in the results format to show formatted data or other information.

FUNCTION IsIndexEncrypted()  

Is index encrypted?

Returns [boolean] 0 - Not Encrytped, 1 - Encrypted
Info

This method must be implemented in child class if associated index is encrypted

Properties inherited from: SY_SearchData

cIndexFieldEntityKey$, cIndexFieldEntityName$, cIndexFieldDocKey$, cIndexFieldDocData$, cIndexFieldDocStored$, cDefaultFieldSep$, cIndexName$, cIndexAlternateSep$, EntityName$, LastSearchValue$, RebuildMsg$, ResultCount, SearchResultLimit

Methods inherited from: SY_SearchData

AdvancedSearch(), BuildIndex(), CheckBuildLockFile(), CheckIndexData(), CreateIndex(), DeleteDocument(), GetDataIOL$(), GetIndexName$(), GetIndexPassword$(), GetMlacExpressions(), GetResultsFormat$(), GetResultsIOL$(), GetStoredIOL$(), GetStoredValue$(), IsIndexEncrypted(), IsIndexUpdateInProgress(), MarkIndexRebuildRequired(), OpenIndex(), ResetIndex(), ReturnSearch(), SearchIndex(), SetEntityKeyValue(), SetEntityName(), SetSkipProgessBar(), UpdateDocument(), FreeIndexDocumentObjects(), GetEntityKeyValue$(), InitSearchObject(), IsRebBuildRequired(), ShowProgressBar(), TranslateIndexData$(), TranslateSearchData$(), UpdateIndex(), UpdateProgressBar(), WriteBuildIndexLog()