Secured Enterprise Search
The text search control within FDA is used for SES. When utilizing SES as the active text search engine the following fields are hidden at runtime.
Case Sensitive
Include Similar Words
When you build the business view for the form containing the text search control, you might consider including the data dictionary items, sesscr and txtsum. The sesscr data item displays the score for each match returned; that is, the extent to which the result matches that for which the user originally searched. Txtsum displays the summary for the returned value; that is, the context in which the match occurred. When placed in a grid, the system populates the column automatically when the user executes a find.
Set Text Search Keyword System Function
To give flexibility to application developers to pass complex SES query based grammar as part of the keywords, the 'Set Text Search Keywords' system function is made available in the General category of system functions.
You can provide certain options like Match Any/Match All/Match Exact/Complex Query to the end user. Based on the option selected by the end user custom logic can be written to generate queries following SES rules and set that query to the system function provided.
Run Time Filters
If a run time filter option is selected from the filter options of a filter column a different set of operators is displayed based on the data type of the filter column.
Data Type |
Operators |
---|---|
String/Var String |
Contains Equals != |
Character |
Equals!= |
Number/Date |
< > <= >= = != |
Incremental Build
A full build results in the generation of the RSS feed for all records in the view. When a small set of records are modified (added/updated) as part of the business logic, it is not desirable to request a full build frequently. In such scenarios, an incremental build invocation can be embedded in the business function logic.
Below is code representing an incremental build embedded in the business function logic.
LPVOID lpVoid; HENV hEnv; HUSER hUser; HREQUEST hRequest; KEY1_F0101 dsKeySentStruct = {0}; F0101 dsStruct = {0}; JDEDB_RESULT rcode; MATH_NUMERIC mnSelect; LPKEYINFO lpKeyInfo = NULL; BOOL bTranStatus; JCHAR szBuf[1024] = {0}; short nNumKeys = 1; int nNotUsed = 0; if (JDB_InitEnv(&hEnv) != JDEDB_PASSED) { printf("JDB_InitEnv Failed\n"); return 0; } if (JDB_InitUser(hEnv,&hUser,_J("TEST"),JDEDB_COMMIT_AUTO) != JDEDB_PASSED) { printf("JDB_InitUser Failed\n"); JDB_FreeEnv(hEnv); return 0; } JDB_TextSearchOpenView(hUser,_J("V0101C"),_J("Business Data - TEST"),&hRequest); lpKeyInfo = (LPKEYINFO) jdeAlloc(COMM_POOL,sizeof(KEYINFO)*1,MEM_ZEROINIT); jdeNIDcpy(lpKeyInfo[0].szTable,_J("F0101")); jdeNIDcpy(lpKeyInfo[0].szDict,_J("AN8")); lpKeyInfo[0].idInstance = 0; ParseNumericStringEx (&mnSelect, _J("1"),DEFAULT_SEPARATOR); lpKeyInfo[0].lpJDEValue = &mnSelect; SesTextSearchIncrementIndexing(hUser,_J("V0101C"),_J("Business Data - TEST"),TEXTSEARCH_INDEX_INSERT,lpKeyInfo,1); jdeFree(lpKeyInfo); JDB_FreeUser(hUser); JDB_FreeEnv(hEnv); }
The SES Text Search Increment Indexing elements are described in the table below.
Value |
Direction |
Element |
---|---|---|
hUser |
-> |
User Handle |
_J("V0101C") |
-> |
Business View Name |
_J("Business Data - TEST") |
-> |
Data Source Override |
TEXTSEARCH_INDEX_INSERT |
-> |
Index Mode |
lpKeyInfo |
-> |
Key Info |
1 |
-> |
Number of Keys |
The options for Index Mode are:
TEXTSEARCH_INDEX_INSERT
TEXTSEARCH_INDEX_UPDATE