|
ibi Patterns .NET API
|
Base class for all interactions with the ibi™ Patterns - Search Server. More...
Public Types | |
| enum | ConnectionPoolingPolicy { None , Local , Shared } |
| Possible connection pooling policies. More... | |
| enum | ShutdownStatus { Initiated = 0 , Complete = 1 } |
| Shutdown the ibi™ Patterns - Search Server. More... | |
Public Member Functions | |
| NetricsServerInterface (String host, int port) | |
| NetricsServerInterface (String host, int port, int encodingNum) | |
| NetricsServerInterface (String host, int port, bool debug) | |
| Set debug to true to print socket output to stdout. | |
| bool | DebuggingOn () |
| Turn on socket protocol debugging output. | |
| bool | DebuggingOff () |
| Turn off socket protocol debugging output. | |
| void | selectLayout (String layout) |
| Obsolete. Layouts are deprecated since version 5.6, and removed in 5.7. This function has no effect. | |
| String | getLayout () |
| Obsolete. Layouts are deprecated since version 5.6, and removed in 5.7. This function always returns null. | |
| bool | ParseDebuggingOn () |
| Turn on response parsing debugging output. | |
| bool | ParseDebuggingOff () |
| Turn off response parsing debugging output. | |
| ConnectionPoolingPolicy | getConnectionPoolingPolicy () |
| Get the current connection pooling policy. Default is ConnectionPoolingPolicy.Shared. | |
| void | setConnectionPoolingPolicy (ConnectionPoolingPolicy policy) |
| Changes the connection pooling policy for this NetricsServerInterface object. Use of this function is not generally recommended. | |
| NetricsTableStats | tblload (NetricsTable tbl) |
| Used to load a NetricsTable into the server. | |
| NetricsTableStats | tblload (NetricsTable tbl, bool doMaxWork) |
| Used to load a NetricsTable into the server. | |
| NetricsTableStats | tblload (NetricsTable tbl, NetricsRecFile fileDef) |
| Create and load a table from a server side CSV file. | |
| NetricsTableStats | addRecsFromFile (String tblName, bool replaceNotAdd, NetricsRecFile fileDef) |
| Add or replace records from a file. | |
| NetricsTableStats | updRecsFromFile (String tblName, NetricsRecFile fileDef) |
| Update records from a server side file. | |
| void | thcreate (NetricsThesaurus thes) |
| Create a thesaurus in the ibi™ Patterns - Search Server. | |
| void | cthcreate (NetricsCombinedThesaurus cthes) |
| Create a combined thesaurus in the ibi™ Patterns - Search Server. | |
| void | cmapcreate (NetricsCharmap cmap) |
| Create a character map in the ibi™ Patterns - Search Server. | |
| String[] | cmaplist () |
| Lists the character maps currently loaded in the ibi™ Patterns - Search Server. | |
| NetricsCharmap | cmapget (String name) |
| Gets the content of a character-map. | |
| NetricsCharmapStats[] | cmap_stats (String[] cmap_names) |
| Lists statistics on character maps currently loaded on the server. | |
| void | wdcreate (NetricsWeightedDictionary wdict) |
| Create a weighted dictionary in the ibi™ Patterns - Search Server. | |
| void | rlcreate (String rlModelName, String rlModelFile) |
| Create a learning engine model in the server. | |
| void | rlcreate_l (String rlModelName, String rlModelFile, bool allowLargeGatewayMem) |
| Create a learning engine model in the server. | |
| void | rlcreate_l (String rlModelName, String rlModelFile) |
| Like rlcreate_l(rlModelName, rlModelFile, bool), except the gateway model-in-memory flag is left at the server default (currently false). | |
| NetricsModelStats[] | rllist (String[] modellist) |
| List information on ibi™ Patterns - Search Learn Models. | |
| void | rldelete (String[] modellist) |
| Delete one or more ibi™ Patterns - Search Learn Models. | |
| double | rleval (String rlModelName, double[] featurevec) |
| Evaluate an ibi™ Patterns - Search Learn Model with the given vector of feature values. | |
| NetricsSearchResponse | search (NetricsSearchCfg cfg, NetricsSearchOpts opts) |
| Version of search to search a single table. | |
| NetricsSearchResponse | search (NetricsSearchCfg[] tblCfgs, NetricsSearchOpts opts) |
| Perform a search. | |
| NetricsSearchResponse | scoreRecords (NetricsQuery query, NetricsSearchOpts query_opts, NetricsTable rec_format, params NetricsRecord[] records) |
| Score one or more records against a query. | |
| NetricsSearchResponse | scoreRecords (NetricsQuery query, NetricsSearchOpts query_opts, NetricsTable rec_format, NetricsTableRecSrc rec_src) |
| Score all records from a record source against a query. | |
| NetricsTableStats[] | list (String[] tblnames, bool includeVarAttrNames) |
| Lists statistics for tables currently loaded in the ibi™ Patterns - Search Server. | |
| NetricsTableStats[] | list (String[] tblnames) |
| Lists statistics for tables currently loaded in the ibi™ Patterns - Search Server. | |
| NetricsIdxStats[] | idxlist (String[] tblnames) |
| Lists statistics for partitioned indexes. | |
| void | thdelete (String[] theslist) |
| Delete one or more thesauri currently loaded on the server. | |
| String[] | thlist () |
| Lists the thesauruses currently loaded in the ibi™ Patterns - Search Server. | |
| NetricsThesStats[] | thes_stats (String[] thes_names) |
| Lists statistics on thesauri currently loaded on the server. | |
| void | tblmove (String oldName, String newName) |
| Rename a table. | |
| void | tbldelete (String tblName) |
| Delete a table. | |
| NetricsRecord[] | recget (String tblName, String[] recKeys) |
| Get multiple records from a table. | |
| NetricsRecord | recget (String tblName, String recKey) |
| Get a single record from a table. | |
| NetricsRecord | getChildRecord (String table_name, String parent_key, String child_key) |
| See getChildRecords(string,string[],string[]) | |
| NetricsRecord[] | getChildRecords (String table_name, String[] parent_keys, String[] child_keys) |
| Get multiple records from a child table. | |
| NetricsRecord[] | getChildRecords (String table_name, ChildType child_type, String[] parent_keys, String[] child_keys) |
| Get multiple records from a child table. | |
| NetricsRecord[] | getChildRecords (String table_name, ChildType child_type, String[] parent_keys, String[] child_keys, bool do_max_work) |
| Get multiple records from a child table. | |
| NetricsTableStats | delChildRecord (String table_name, String parent_key, String child_key, bool doMaxWork) |
| NetricsTableStats | delChildRecords (String table_name, String[] parent_keys, String[] child_keys, bool doMaxWork) |
| Delete multiple records from a child table. | |
| NetricsTableStats | delChildRecords (String table_name, ChildType child_type, String[] parent_keys, String[] child_keys, bool doMaxWork) |
| Delete multiple records from a child table. | |
| NetricsCompoundRecord[] | getCompoundRecords (String parent_table, String[] child_tables, params String[] parent_keys) |
| Get multiple compound records. | |
| NetricsTableStats | recadd (String tblName, NetricsTableRecSrc src, bool doMaxWork, int estNumRecs) |
| Add records to a table. | |
| NetricsTableStats | recadd (String tblName, NetricsTableRecSrc src, bool doMaxWork) |
| recadd with no lock key or estimated number of record. | |
| NetricsTableStats | recadd (String tblName, NetricsRecord rec) |
| Add a single record to a table. | |
| NetricsTableStats | recdelete (String tblName, String[] recKeys, bool doMaxWork) |
| Delete records from a table. | |
| NetricsTableStats | recdelete (String tblName, String recKey) |
| Delete a single record from a table. | |
| NetricsTableStats[] | delCompoundRecords (String parent_table, String[] child_tables, String[] parent_keys, bool delete_orphans, bool doMaxWork) |
| Deletes a set of records from a parent table, and deletes associated child records from child tables. | |
| NetricsTableStats | recupdate (String tblName, NetricsTableRecSrc src, bool doMaxWork) |
| Update records in a table. | |
| String[] | checkpoint (String[] tblnames) |
| Checkpoint tables currently loaded in ibi Patterns - Search Engine. Obsolete. Checkpoint/Restore is deprecated in favor of Durable Data. See the ibi™ Patterns Installation Guide.")]. | |
| NetricsObjectNameCollection | checkpointObjects (NetricsObjectNameCollection objects) |
| Checkpoint objects (tables, thesauri, character maps, rlink models) currently loaded in the ibi™ Patterns - Search Server. Obsolete. Checkpoint/Restore is deprecated in favor of Durable Data. See the ibi™ Patterns Installation Guide.")]. | |
| String[] | restore (String[] tblnames) |
| Restore tables previously checkpointed. Obsolete. Checkpoint/Restore is deprecated in favor of Durable Data. See the ibi™ Patterns Installation Guide.")]. | |
| NetricsObjectNameCollection | restoreObjects (NetricsObjectNameCollection objects) |
| Restore objects previously checkpointed. Obsolete. Checkpoint/Restore is deprecated in favor of Durable Data. See the ibi™ Patterns Installation Guide.")]. | |
| NetricsTableStats | recreplace (String tblName, NetricsTableRecSrc src, bool doMaxWork) |
| Replace records in a table. | |
| NetricsTableStats | recreplace (String tblName, NetricsRecord rec) |
| Replace a single existing record in a table. | |
| NetricsTableStats | recupdate (String tblName, NetricsRecord rec) |
| Update a single existing record in a table. | |
| NetricsTableStats | doRecOps (String table_name, bool do_max_work, NetricsRecOpSrc rec_ops) |
| Perform a mixed set of record updates. | |
| NetricsTableStats | doRecOps (String table_name, bool do_max_work, params NetricsRecOp[] rec_ops) |
| Perform a mixed set of record updates. | |
| NetricsCmdStats[] | cmdstats (String[] cmd_names) |
| Retrieve processing statistics for commands. | |
| NetricsCmdStats[] | cmdstats (String[] cmd_names, double duration) |
| Retrieve processing statistics for specified duration for commands. | |
| NetricsCmdStats[] | cmdstats (String[] cmd_names, double duration, double end_time) |
| Retrieve processing statistics for specified time period. | |
| void | cmdstats_reset (String[] cmd_names, double start_time) |
| Reset processing statistics for the specified commands. | |
| void | svrlogon () |
| Turn on search logging (must be enabled when the server starts up). | |
| void | svrlogoff () |
| Turn off search logging (must be enabled when the server starts up). | |
| NetricsServerStats | server_info () |
| Retrieve the server version information. | |
| String | svrversion () |
| Retreive the ibi™ Patterns - Search Server's version information. | |
| bool | isDecisionEngine () |
| bool | isGIPEnabled () |
| bool | isSortEnabled () |
| bool | isPsiEnabled () |
| bool | isDurableDataEnabled () |
| Return true if the server is using the durable-data feature. | |
| String | version () |
| Retreive the ibi™ Patterns - Search Server Interface version information. | |
| ShutdownStatus | svrshutdown () |
| Initiates a server shutdown. | |
| ShutdownStatus | svrshutdown (int timeout) |
| Initiates a server shutdown. | |
| void | loadClusterConfiguration (String file_name) |
| Load a new cluster configuration file on the gateway server. | |
| void | svrnoop () |
| NetricsTranStats[] | listTransactions (int idle_cutoff) |
| Get statistics on open transactions. | |
| void | tranAbort (long tran_id) |
| Abort a transaction. | |
| void | tranCommit (long tran_id) |
| Commit a transaction. | |
| void | tranForceCommit (long tran_id) |
| Commit a transaction even if it has errors. | |
| void | tranSetIdleOpts (int idle_time, String action) |
| Set the idle transaction processing parameters on the server. | |
| NetricsRecord[] | recnext (NetricsTableCursor cursor) |
| Retrieve records from a table cursor. | |
| NetricsCompoundRecord[] | compoundNext (NetricsTableCursor cursor) |
| Retrieve compound records from a cursor. | |
| int | getMaxSocketUsage () |
| Return the maximum number of queries to perform on a given socket before closing it. | |
| void | setMaxSocketUsage (int val) |
| Set the maximum number of queries to perform on a given socket before closing it. | |
| TimeSpan? | getMaxSocketLifetime () |
| Return the maximum lifetime of socket connections to the engine. | |
| void | setMaxSocketLifetime (TimeSpan? val) |
| Set the maximum lifetime of socket connections to the engine. | |
| int | getConnectRetryCount () |
| Return the retry count for establishing a socket connection to the engine. | |
| void | setConnectRetryCount (int val) |
| Set the retry count for establishing a socket connection to the engine. | |
| int | getConnectTimeout () |
| Return the per-attempt timeout for establishing a socket connection to the engine. | |
| void | setConnectTimeout (int val) |
| Set the per-attempt timeout for establishing a socket connection to the engine. | |
| CultureInfo | setServerCultureInfo (CultureInfo culture_info) |
| Sets the culture used by the interface when formatting and interpreting data exchanged with the server. | |
| void | setNetProtocols (ProtocolChoice protocols) |
| Set the network protocols that will be used to connect to the ibi™ Patterns - Search Server. | |
| long? | getFormatTransmitDuration () |
| Gets the time spent formatting and transmitting the last command the current thread executed on this interface object. | |
| long? | getServerDuration () |
| Gets the time spent waiting for the server to begin responding to the last command the current thread executed on this interface object. | |
| long? | getReceiveParseDuration () |
| Gets the time spent receiving and parsing the response to the last command the current thread executed on this interface object. | |
| long? | getCommandDuration () |
| Gets the total time spent on the last command the current thread executed on this interface object. | |
| bool | getSSLEnabled () |
| Returns. | |
| void | setSSLEnabled (bool enable) |
| Sets the SSL enable flag. | |
| RemoteCertificateValidationCallback | getCertificateValidator () |
| Get the current certificate-validation callback. | |
| void | setCertificateValidator (RemoteCertificateValidationCallback certValidator) |
| Sets the certificate-validation callback. | |
Protected Member Functions | |
| NetricsServerInterface (String host, int port, bool debug, NetricsServerInterface.ConnectionPoolingPolicy pooling_policy) | |
| Create an object for interacting with an ibi™ Patterns - Search Server. | |
Base class for all interactions with the ibi™ Patterns - Search Server.
All interactions with the ibi™ Patterns - Search Server are performed using objects of this class or the NetricsTransactions class, which is an extension of this class. All operations on the ibi™ Patterns - Search Server are exposed as methods of objects of this class.
The method calls used to perform operations on the ibi™ Patterns - Search Server do not retain any state, all information is maintained on the ibi™ Patterns - Search Server itself. Because these methods are stateless they are thread safe. However these objects do maintain certain connection information. Methods which update this information are NOT thread safe. These methods include: DebuggingOn, DebuggingOff, ParseDebuggingOn, ParseDebugginOff, setServerCultureInfo, setMaxSocketUsage, setMaxSocketLifetime, setMaxSocketIdleTime, setConnectRetryCount, setConnectTimeout, and setConnectionPoolingPolicy. None of these methods should ever be called on an object being shared by multiple threads.
This sample code shows how to specify a connection to the ibi™ Patterns - Search Server running on the localhost listening to port 5051 and obtain its version information.
Possible connection pooling policies.
| Enumerator | |
|---|---|
| None | None : All connections made by this NetricsServerInterface object are transient. |
| Local | Local: This NetricsServerInterface object has its own pool of connections. |
| Shared | Shared: This NetricsServerInterface object uses a connection pool that is shared amongst similarly marked NetricsServerInterface objects within the application. |
Shutdown the ibi™ Patterns - Search Server.
This sample code shows how to ping the ibi™ Patterns - Search Server.
| NetricsException | If the server indicates that an error has occured |
| Enumerator | |
|---|---|
| Initiated | Shutdown has been started. |
| Complete | Shutdown is done. |
|
inline |
| host | The hostname of the machine on which the ibi™ Patterns - Search Server is running |
| port | The port number on which the ibi™ Patterns - Search Server is running |
|
inline |
| host | The hostname of the machine on which the ibi™ Patterns - Search Server is running |
| port | The port number on which the ibi™ Patterns - Search Server is running |
| encodingNum | The encoding number to use for the relevant character set. |
|
inlineprotected |
Create an object for interacting with an ibi™ Patterns - Search Server.
| host | The hostname or IP address of the machine on which the ibi™ Patterns - Search Server is running. |
| port | The port number which the ibi™ Patterns - Search Server is listening on |
| debug | If true output detailed information on all interactions with the server. |
| pooling_policy | The connection pooling policy to use. |
|
inline |
Set debug to true to print socket output to stdout.
| host | The hostname of the machine on which the ibi™ Patterns - Search Server is running |
| port | The port number on which the ibi™ Patterns - Search Server is running |
| debug | Pass true to turn on socket protocol debugging output. |
|
inline |
Add or replace records from a file.
| tblName | Defines table records are added to or replaced in. |
| replaceNotAdd | If true this replaces existing records, if false it adds new records. |
| fileDef | Defines the name and format of the file Containing the records. |
| NetricsException | If the server indicates that an error has occured (Possible errors - same as recadd) |
This sample code shows how to add records from a file to an existing table starting with a key of 100.
The ibi™ Patterns - Search Server is running on the localhost listening to port 5051.
See NetricsRecFile for a definition of it's associated parameters.
|
inline |
Checkpoint tables currently loaded in ibi Patterns - Search Engine. Obsolete. Checkpoint/Restore is deprecated in favor of Durable Data. See the ibi™ Patterns Installation Guide.")].
Checkpointing a table allows the table to be restored to the state it was in at the time of the checkpoint. A checkpoint is made to a permanent file store, so checkpoints can be restored across different server invocations. A checkpoint restore is the fastest way to load a table.
In order to checkpoint a file the server must have been started with checkpointing enabled. See the server user's manual for information on how to enable checkpointing.
If one or more of the named tables do not exists a NetricsException is thrown with an error code of DBNOTFOUND. All tables that were found are checkpointed.
If some, but not all, of the tables fail to checkpoint for any other reason a NetricsException is thrown with error code PARTIALCHPT. Again some tables may have checkpointed successfully in this case.
If all tables fail to checkpoint correctly and not all of them failed because the named table didn't exist a NetricsException is thrown with error code CHPTFAILED. The extended error item will be a generic list containing the DBDESCRIPTOR for each table that failed to checkpoint correctly for any reason.
This sample code shows how to checkpoint the "names" table on the ibi™ Patterns - Search Server running on the localhost listening to port 5051.
| tblnames | The names of the tables to be checkpointed. Pass null to checkpoint all tables currently in the server. |
| NetricsException | If the server indicates that an error has occured (Possible errors - DBPARAM, NODBDESC, EXPECTDBDESC, DUPDBDESCS, FEATURESET, DBNOTFOUND, PARTIALCHPT, CHPTFAILED, INTERNAL, NOSYSINIT) |
|
inline |
Checkpoint objects (tables, thesauri, character maps, rlink models) currently loaded in the ibi™ Patterns - Search Server. Obsolete. Checkpoint/Restore is deprecated in favor of Durable Data. See the ibi™ Patterns Installation Guide.")].
Checkpointing an object allows it to be restored to the state it was in at the time of the checkpoint. A checkpoint is made to a permanent file store, so checkpoints can be restored across different server invocations. A checkpoint restore is the fastest way to load an object.
In order to checkpoint an object the server must have been started with checkpointing enabled. See the server user's manual for information on how to enable checkpointing.
If one or more of the named objects does not exist a NetricsException is thrown with an error code of DBNOTFOUND. All objects that were found are checkpointed.
If some, but not all, of the objects fail to checkpoint for any other reason a NetricsException is thrown with error code PARTIALCHPT. Again some objects may have checkpointed successfully in this case.
If all objects fail to checkpoint correctly and not all of them failed because the named table didn't exist a NetricsException is thrown with error code CHPTFAILED.
The extended error item will be a generic list containing the descriptor for each object that failed to checkpoint correctly for any reason.
If tables and/or thesauri with user-defined character maps are specified, those user-defined character maps are automatically added to the set of objects to checkpoint.
| objects | The names of the objects to be checkpointed. Pass null to checkpoint all objects currently in the server. |
| NetricsException | If the server indicates that an error has occured (Possible errors - DBPARAM, NODBDESC, EXPECTDBDESC, DUPDBDESCS, FEATURESET, DBNOTFOUND, PARTIALCHPT, CHPTFAILED, INTERNAL, NOSYSINIT) |
| System.IO.IOException | If an I/O error occurs. |
|
inline |
Lists statistics on character maps currently loaded on the server.
| cmap_names | A list of the character map names who's statistics should be returned. Set this to null to get statistics on all character maps. |
|
inline |
Create a character map in the ibi™ Patterns - Search Server.
| cmap | The NetricsCharmap object to create on the ibi™ Patterns - Search Server. |
|
inline |
Gets the content of a character-map.
| name | Name of the character-map whose content is retrieved. |
|
inline |
Lists the character maps currently loaded in the ibi™ Patterns - Search Server.
|
inline |
Retrieve processing statistics for commands.
This reports statistics for the named commands. A command name of NetricsCmdStats.CMD_ALL can be used to retrieve statistics for all commands. This command will generate a report that includes all commands completed from the time the server was started until the time the request was received.
| cmd_names | The names of the commands to be included in the report. The class NetricsCmdStats has defines of all command names. |
|
inline |
Retrieve processing statistics for specified duration for commands.
This reports statistics for the named commands starting from the present moment going duration seconds into the past. A command name of NetricsCmdStats.CMD_ALL can be used to retrieve statistics for all commands.
The duration value is approximate. Each time a report request is made that does not request a specific end_time a reporting tic-mark is made at that time. The start and end time for a report will be reset to the closest time tic-mark set by a previous report. (This implies the first report always includes the entire time span since the start of the server.) The normal procedure is to equest reports at a fixed interval requesting durations in units of the request interval. E.g. request a report every 5 minutes covering a 15 minute period.
| cmd_names | The names of the commands to be included in the report. The class NetricsCmdStats has defines of all command names. |
| duration | The time period in seconds to be covered by this report. |
|
inline |
Retrieve processing statistics for specified time period.
This reports statistics for the named commands ending at the given time going duration seconds into the past from that time. A command name of NetricsCmdStats.CMD_ALL can be used to retrieve statistics for all commands.
The end time and duration are approximate. Each time a report request is made that does not request a specific end time a reporting tic-mark is made at that time. The start and end time for a report will be reset to the closest time tic-mark set by a previous report. (This implies the first report always includes the entire time span since the start of the server.) The normal procedure is to request reports at a fixed interval requesting durations in units of the request interval. E.g. request a report every 5 minutes covering a 15 minute period.
The end_time value is given in milliseconds from an arbitrary epic point, thus the only valid way to get an end_time value is to use a value returned by a previous report. So if you are requesting reports every 5 minutes and you want reports that cover the previous 5, 10, 15 minutes and the entire server time span the normal procedure would be something like:
| cmd_names | The names of the commands to be included in the report. The class NetricsCmdStats has defines of all command names. |
| duration | The time period in seconds to be covered by this report. -1.0 can be used to indicate "forever". |
| end_time | The ending time for a report. |
|
inline |
Reset processing statistics for the specified commands.
This resets the processing statistics, removing any collected statistics for commands completed before start_time (the present moment if < 0.0). A command name of NetricsCmdStats.CMD_ALL can be used to retrieve statistics for all commands.
The start_time value is given in milliseconds from an arbitrary epic point, thus the only valid way to get a start_time value is to use a value returned by a previous report. As with end_time the start time is approximate and matches the start time of previously tic-marked reports.
| cmd_names | The names of the commands to be included in the report. The class NetricsCmdStats has defines of all command names. |
| start_time | Data for commands before this point is deleted. |
|
inline |
Retrieve compound records from a cursor.
This method is used to retrieve compound records from a table cursor. A compound record consists of a parent record and all child records linked to that parent record. The cursor scans the parent table, and fetches all child records of the parent records returned to produce the compound records returned.
| cursor | The cursor being used to scan the table. |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND) |
| System.IO.IOException | If an I/O error occurs |
| ArgumentException | if parent_table is not a parent table, of if any child table is not a child of parent_table, or if a duplicate name exists in the child_tables list. |
|
inline |
Create a combined thesaurus in the ibi™ Patterns - Search Server.
A Thesaurus is used for word substitution such as synonyms or related terms.
A Weighted Dictionary is a variant of a Thesaurus which can reduce the contribution of a synonym in the overall score.
A Combined Thesaurus combines the features of a Thesaurus and a Weighted Dictionary and can apply a penalty score to be applied to each Thesaurus class.
This sample code shows how to create a Combined Thesaurus in the ibi™ Patterns - Search Server running on the localhost listening to port 5051.
| cthes | The NetricsCombinedThesaurus object to create on the ibi™ Patterns - Search Server. The name and synonyms of the thesaurus are defined by using the thesaurus object's methods. |
| NetricsException | If the server indicates that an error has occured (Possible errors - ARRAYLEN, CHARMAP, EXPECTTHESNAME, EXPECTLIST, FEATURESET, IOERROR, PARAMVAL, PARAMMISSING) |
|
inline |
Turn off socket protocol debugging output.
Turn off socket protocol debugging output. This should only be used on the advice of ibi Patterns support.
This sample shows how to turn off debugging on the client side.
|
inline |
Turn on socket protocol debugging output.
Turn on very verbose socket protocol debugging output. This should only be used on the advice of ibi Patterns support.
This sample shows how to turn on debugging on the client side.
|
inline |
|
inline |
Delete multiple records from a child table.
This method adds the ability to select child record for deletion by orphan status. Only records with the given orphan status are deleted.
| table_name | The name of the child table from which the records will be deleted |
| child_type | The type of child records to delete. One of ORPHANS, NONORPHANS or ALL. |
| parent_keys | The parent record keys of the records to delete |
| child_keys | The child record keys of the records to delete. If null is passed in then all child records with the given parent record keys are deleted. |
| doMaxWork | Continue on error - deletes those records which do exist |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM) |
| System.IO.IOException | If an I/O error occurs |
|
inline |
Delete multiple records from a child table.
| table_name | The name of the child table from which the records will be deleted |
| parent_keys | The parent record keys of the records to delete |
| child_keys | The child record keys of the records to delete |
| doMaxWork | Continue on error - deletes those records which do exist |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM) |
| System.IO.IOException | If an I/O error occurs |
|
inline |
Deletes a set of records from a parent table, and deletes associated child records from child tables.
| parent_table | The name of the parent table. The table must exist in the Patterns server and have a table type of parent. |
| child_tables | A list of names of child tables. Only child records from these tables are deleted. All tables listed must be children of parent_table. Duplicate names are not allowed. If null, all child tables of the given parent table are included. |
| parent_keys | Keys of parent records to be deleted. |
| delete_orphans | If true, all child records whose parent-reference matches one of the keys in parent_keys
If false, only non-orphan child records whose parent-reference matches one of the keys in parent_keys
|
| doMaxWork | Ignore record-not-found errors when deleting from the parent table. |
| NetricsException | If the server indicates an error occured. Possible errors: TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM, ARRAYLEN |
| System.IO.IOException | If an I/O error occurs |
| ArgumentException | If parent_table is not a parent table, or if any child table is not a child of parent_table, or if a duplicate name exists in the child_tables list, or if parent_keys is null, or if parent_table is null, or if a child table name is null. |
NetricsCompoundRecord
|
inline |
Perform a mixed set of record updates.
This method performs a set of record update operations. The operations to perform are defined by a stream of NetricsRecOp objects. The operations are performed in the order they are returned from the NetricsRecOpSrc. Record operations performed earlier in the stream are seen by later operations in the stream. For example if a new record is added, a delete that follows it will delete the added record instead of failing. All operations are committed or rolled back as a unit.
| table_name | The name of the ibi™ Patterns - Search table holding the records. |
| do_max_work | If true record key and record format errors are quietly ignored. |
| rec_ops | The source that provides the stream of record operations. |
|
inline |
Perform a mixed set of record updates.
This method performs a set of record update operations. The operations to perform are defined by an array of NetricsRecOp objects. The operations are performed in the order they are given. Record operations performed earlier in the array are seen by later operations in the array. For example if a new record is added, a delete that follows it will delete the added record instead of failing. All operations are committed or rolled back as a unit.
| table_name | The name of the ibi™ Patterns - Search table holding the records. |
| do_max_work | If true record key and record format errors are quietly ignored. |
| rec_ops | An array or list of record operations. |
|
inline |
Get the current certificate-validation callback.
The validator is ignored if SSL is disabled.
the current certificate validator. The default is NetricsConMgr.DefaultCertificateValidator.
A null return indicates the application has changed validation back to the .NET Framework default.
|
inline |
Get multiple records from a child table.
This method should typically be used instead of performing multiple single record "gets" for performance reasons.
This method adds the ability to specify the type of child records to be returned: ORPHANS, NONORPHANS or ALL types.
| table_name | The name of the child table to get the records from |
| child_type | The type of child records to return. One of ORPHANS, NONORPHANS or ALL. |
| parent_keys | The parent record keys of the records to get |
| child_keys | The child record keys of the records to get |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM, ARRAYLEN) |
| System.IO.IOException | If an I/O error occurs |
|
inline |
Get multiple records from a child table.
This method should typically be used instead of performing multiple single record "gets" for performance reasons.
This method adds the ability to specify the type of child records to be returned: ORPHANS, NONORPHANS or ALL types.
| table_name | The name of the child table to get the records from |
| child_type | The type of child records to return. One of ORPHANS, NONORPHANS or ALL. |
| parent_keys | The parent record keys of the records to get |
| child_keys | The child record keys of the records to get |
| do_max_work | If true record not found errors are ignored. |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM, ARRAYLEN) |
| System.IO.IOException | If an I/O error occurs |
|
inline |
Get multiple records from a child table.
This method should typically be used instead of performing multiple single record "gets" for performance reasons.
| table_name | The name of the child table to get the records from |
| parent_keys | The parent record keys of the records to get |
| child_keys | The child record keys of the records to get |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM, ARRAYLEN) |
| System.IO.IOException | If an I/O error occurs |
|
inline |
Gets the total time spent on the last command the current thread executed on this interface object.
|
inline |
Get multiple compound records.
This method is used to retrieve compound records. A compound record consists of a parent record and all child records linked to that parent record. The records are fetched based on a list of the keys of the parent records. A list of the child tables to be included can be specified, by default all child tables of the parent table are included.
| parent_table | The name of the parent table. The table listed must exist in the Patterns server and have a table type of parent. |
| child_tables | A list of the names of the child tables to be included in the compound record. All tables listed must be a child table of the given parent table. Duplicate names are not allowed. The order of listing is irrelevant. If this is null all child tables of the given parent table are included. |
| parent_keys | The parent record keys of the records to get |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM, ARRAYLEN) |
| System.IO.IOException | If an I/O error occurs |
| ArgumentException | if parent_table is not a parent table, or if any child table is not a child of parent_table, or if a duplicate name exists in the child_tables list. |
|
inline |
Return the retry count for establishing a socket connection to the engine.
Default is 1.
|
inline |
Return the per-attempt timeout for establishing a socket connection to the engine.
Measured in milli-seconds. Default is 120000 (2 minutes).
|
inline |
Gets the time spent formatting and transmitting the last command the current thread executed on this interface object.
|
inline |
Return the maximum lifetime of socket connections to the engine.
Not relevent if connection pooling is turned off.
|
inline |
Return the maximum number of queries to perform on a given socket before closing it.
Not relevent if connection pooling is turned off.
|
inline |
Gets the time spent receiving and parsing the response to the last command the current thread executed on this interface object.
|
inline |
Gets the time spent waiting for the server to begin responding to the last command the current thread executed on this interface object.
|
inline |
Returns.
SSL is disabled by default.
|
inline |
Lists statistics for partitioned indexes.
This command can be used to retrieve information on all of the partition indexes associated with one or more tables loaded into the ibi™ Patterns - Search Server server. Information can be retrieved for all tables or a list of specific tables. Information for all indexes associated with the indicated tables is returned as a list of NetricsIdxStats objects. It is an error if a named table doesn't exist. If a table has no indexes an empty stats object is returned for that table.
| tblnames | The names of the tables for which to retrieve statistics. Pass null to recieve information for indexes of all tables. |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND, EXPECTTBLDESC, EXPECTLIST, FEATURESET, NOTBLDESC, NOSYSINIT) |
|
inline |
<summary> Return true if the server indicates it is a Learning Engine </summary>
This returns true if the server indicates it supports Learning Models. Note that older versions of the server do not send back this information, so this method will return false for servers before release 4.3.1 even if they do support the Learning Model.
| NetricsException | If the server indicates that an error has occured |
|
inline |
Return true if the server is using the durable-data feature.
NetricsServerStats.durable_data
|
inline |
<summary> Return true if the server indicates GIP is the default prefilter. </summary>
This returns true if the server indicates tables creation uses the GIP prefilter by default. Note that older versions of the server do not send back this information, so this method will return false for servers before release 4.3.1 even if they do support the GIP prefilter.
| NetricsException | If the server indicates that an error has occured |
|
inline |
<summary> Return true if the server indicates PSI is the default prefilter. </summary>
This returns true if the server indicates tables creation uses the PSI prefilter by default. Note that older versions of the server do not send back this information, so this method will return false for servers before PSI was released.
| NetricsException | If the server indicates that an error has occured |
|
inline |
<summary> Return true if the server indicates SORT is the default prefilter. </summary>
Return true if the server indicates SORT is the default prefilter.
This returns true if the server indicates tables creation uses the SORT prefilter by default. Note that older versions of the server do not send back this information, so this method will return false for servers before release 4.3.1 even if they do support the SORT prefilter.
| NetricsException | If the server indicates that an error has occured |
|
inline |
Lists statistics for tables currently loaded in the ibi™ Patterns - Search Server.
| tblnames | The names of the tables for which to receive statistics. Pass null to recieve a NetricsTableStats object for every table currently loaded |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND, EXPECTTBLDESC, EXPECTLIST, FEATURESET, NOTBLDESC, NOSYSINIT) |
|
inline |
Lists statistics for tables currently loaded in the ibi™ Patterns - Search Server.
| tblnames | The names of the tables for which to receive statistics. Pass null to recieve a NetricsTableStats object for every table currently loaded |
| includeVarAttrNames | If true, the returned statistics will include the names of all variable-attributes present in each table.There may be thousands of these. |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND, EXPECTTBLDESC, EXPECTLIST, FEATURESET, NOTBLDESC, NOSYSINIT) |
|
inline |
Get statistics on open transactions.
This method returns an array of NetricsTranStats objects, one object for each open transaction with an idle time greater than idle_cutoff. If idle_cutoff is less than 0 all open transactions are returned.
Idle time is measured from the completion of the last command associated with the transaction.
| idle_cutoff | The idle cutoff value in seconds. Only transactions that have been idle for this number of seconds or greater are returned. A value less than 0 will return all open transactions. |
| NetricsException | If the server indicates that an error has occured. |
|
inline |
Load a new cluster configuration file on the gateway server.
| file_name | The name of the new file. This file and path must be recognizable within the context of the cluster gateway. |
|
inline |
Turn off response parsing debugging output.
Turn off response parsing debugging output. This should only be used on the advice of ibi Patterns support.
|
inline |
Turn on response parsing debugging output.
Turn on very verbose response parsing debugging output. This should only be used on the advice of ibi Patterns support.
|
inline |
Add a single record to a table.
| tblName | The name of the table that the record will be added to |
| rec | The record which will be added |
| NetricsException | If the server indicates an error occured |
|
inline |
recadd with no lock key or estimated number of record.
Sample code
|
inline |
Add records to a table.
| tblName | The name of the table that the records will be added to |
| src | The record source for those records which will be added |
| doMaxWork | Continue on error - adds those records which do not already exist |
| estNumRecs | The estimated number of records in the record source.This is used by the server to determine the most efficient loading method. It need not be exact. |
| NetricsException | If the server indicates an error occured (Possible errors - TBLNOTFOUND, EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FIELDLENSUM, NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS, RECEXISTS, UPDPARAM, SHUTDOWN) |
This sample shows how to add records to a table from a csv input file.
|
inline |
Delete a single record from a table.
| tblName | The name of the table from which the record will be deleted |
| recKey | The record key of the record to be deleted |
| NetricsException | If the server indicates that an error has occured |
Sample code
|
inline |
Delete records from a table.
| tblName | The name of the table from which the records will be deleted. |
| recKeys | The record keys of the records to be deleted |
| doMaxWork | Continue on error - deletes those records which do exist, ignores those that don't. |
| NetricsException | If the server indicates an error occured (Possible errors - TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM, SHUTDOWN) |
This sample shows how to delete records from an ibi™ Patterns - Search table.
|
inline |
Get a single record from a table.
| tblName | The name of the table to get the record from |
| recKey | The record key of the record |
| NetricsException | If the server indicates that an error has occured |
Sample code
|
inline |
Get multiple records from a table.
This method should typically be used instead of performing multiple single record "gets" for performance reasons.
| tblName | The name of the table to get the records from |
| recKeys | The record keys of the records to get |
| NetricsException | If the server indicates an error has occured (Possible errors - TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM) |
Sample code
This sample shows how to get/read records from an ibi™ Patterns - Search table.
|
inline |
Retrieve records from a table cursor.
This fetches the next batch of records from a table cursor, updating the cursor position.
| cursor | the cursor we are fetching from. |
|
inline |
Replace a single existing record in a table.
| tblName | The name of the table containing the record being replaced |
| rec | The new record. The value of its record key should be the record key of the record being replaced |
| NetricsException | If the server indicates that an error has occured |
Sample code
|
inline |
Replace records in a table.
| tblName | The name of the table in which records will be replaced. |
| src | The record source for those records which will be replaced |
| doMaxWork | Continue on error - replaces those records which do exist |
| NetricsException | If the server indicates an error occured (Possible errors - TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FIELDLENSUM, NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS, RECNOTFOUND, UPDPARAM, SHUTDOWN) |
This sample shows how to replace records in a table from a csv input file.
|
inline |
Update a single existing record in a table.
Add the record if it doesn't exist, replace it if it does.
| tblName | The name of the table containing the record to be updated. |
| rec | The new record. |
| NetricsException | If the server indicates that an error has occured |
|
inline |
Update records in a table.
This will add each of the records from the source to the named table if the do not already exist, or update them if they do exist.
| tblName | The name of the table to be updated. |
| src | Provides the records to be updated. |
| doMaxWork | Continue on error - ignore records with errors and continue processing. |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FIELDLENSUM, NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS, RECNOTFOUND, UPDPARAM, SHUTDOWN) |
|
inline |
Restore tables previously checkpointed. Obsolete. Checkpoint/Restore is deprecated in favor of Durable Data. See the ibi™ Patterns Installation Guide.")].
This restores a table to the state of the latest checkpoint for that table. The checkpoint could have been made from this invocation of the server, in which case this backs up the state of the table to that at the time of the last checkpoint, or in a previous invocation of the server, in which case this is a way to quickly reload a table.
In order to restore a file the server must have been started with checkpointing enabled. See the server user's manual for information on how to enable checkpointing.
If some, but not all, of the tables fail to restore a NetricsException is thrown with error code PARTIALRESTORE.
If all tables fail to restore correctly a NetricsException is thrown with error code RESTOREFAILED.
This sample code shows how to restore the "names" table from a previous checkpoint.
| tblnames | The names of the tables to be restored. Pass null to restore all tables that were previously checkpointed. |
| NetricsException | If the server indicates that an error has occured (Possible errors - DBPARAM, NODBDESC, EXPECTDBDESC, DUPDBDESCS, FEATURESET, PARTIALRESTORE, RESTOREFAILED, INTERNAL, NOSYSINIT, SHUTDOWN) |
|
inline |
Restore objects previously checkpointed. Obsolete. Checkpoint/Restore is deprecated in favor of Durable Data. See the ibi™ Patterns Installation Guide.")].
This restores objects to the state of the latest checkpoint for those objects. The checkpoint could have been made from this invocation of the server, in which case this backs up the state of the objects to that at the time of the last checkpoint, or in a previous invocation of the server, in which case this is a way to quickly reload objects.
When user-defined character-maps are in use, it is strongly recommended that objects include all character maps.
In order to restore objects the server must have been started with checkpointing enabled. See the server user's manual for information on how to enable checkpointing.
If some, but not all, of the objects fail to restore a NetricsException is thrown with error code PARTIALRESTORE.
If all objects fail to restore correctly a NetricsException is thrown with error code RESTOREFAILED.
| objects | The names of the objects to be restored. Pass null to restore all objects that were previously |
checkpointed.
| NetricsException | If the server indicates that an error has occured (Possible errors - DBPARAM, NODBDESC, EXPECTDBDESC, DUPDBDESCS, FEATURESET, PARTIALRESTORE, RESTOREFAILED, INTERNAL, NOSYSINIT, SHUTDOWN) |
| System.IO.IOException | If an I/O error occurs. |
|
inline |
Create a learning engine model in the server.
| rlModelName | The name of the model to create. |
| rlModelFile | The location of the model on the server's file-system. It must be located inside the server's loadable-data directory. |
|
inline |
Like rlcreate_l(rlModelName, rlModelFile, bool), except the gateway model-in-memory flag is left at the server default (currently false).
See rlcreate_l(String,String,bool).
|
inline |
Create a learning engine model in the server.
| rlModelName | The name of the model to create. |
| rlModelFile | The location of the model on disk. |
| allowLargeGatewayMem | If loading into a cluster, enabling this flag allows the gateway to temporarily store the model in memory. If the flag is not enabled, the gateway will temporarily store the model in a file. In this case, if the gateway is not configured with a temporary storage directory, a FEATURESET error is returned. Enabling theis flag when loading extremely large models (> 50 MB) will return a PARAMVAL error. This flag is ignored when not loading to a cluster. |
|
inline |
Delete one or more ibi™ Patterns - Search Learn Models.
This deletes or more ibi™ Patterns - Search Learn Models currently loaded on the ibi™ Patterns - Search Server.
If any of the model names given are not on the engine a NetricsException error is thrown with a code of RLINKMODELNOTFOUND, however all other models will still be deleted.
| modellist | The names of the models to be deleted. Pass null to delete all models on the server. |
| NetricsException | If the server indicates that an error has occured (Possible errors - NODBDESC, RLINKMODELNOTFOUND, EXPECTLIST, FEATURESET, PARAMVAL, INTERNAL, NOSYSINIT) |
|
inline |
Evaluate an ibi™ Patterns - Search Learn Model with the given vector of feature values.
| rlModelName | The name of the model to use in the evaluation. |
| featurevec | An array of double feature values (from 0.0 to 1.0) which will be evaluated by the model. The number of features in this array must be the same as the model was created and trained with. |
| NetricsException | If the server indicates that an error has occured (Possible errors - NORLINKMODEL, RLINKMODELNOTFOUND, NOFEATUREVEC, NUMFEATURESMISMATCH, FEATURESET, IOERROR, PARAMVAL) |
|
inline |
List information on ibi™ Patterns - Search Learn Models.
This lists basic information on one or more ibi™ Patterns - Search Learn Models currently loaded on the ibi™ Patterns - Search Server.
If any of the model names given are not on the engine a NetricsException error is thrown with a code of RLINKMODELNOTFOUND.
| modellist | The names of the models to be listed. Pass null to list all models on the server. |
| NetricsException | If the server indicates that an error has occured (Possible errors - NODBDESC, RLINKMODELNOTFOUND, EXPECTLIST, FEATURESET, PARAMVAL, INTERNAL, NOSYSINIT) |
|
inline |
Score all records from a record source against a query.
This scores all records retrieved from a record source, against a query, returning a scored search result for each record given.
All records are scored and returned, even if they receive a reject score because of errors or invalid or empty data.
| query | The query to run against the records. The query is the same as for a standard search except no table settings are required (they may be given, but are ignored). |
| query_opts | These are the search options for the query. They are the same as for the standard search except those options relating to the prefilter are ignored. |
| rec_format | This is a table definition. It provides the field names, field types and character maps for the fields in the records. A full table definition may be given, but all parts except field names, field types and character maps are ignored. |
| rec_src | A NetricsTableRecSrc object. All records from this object are sent to the server for scoring. The fields of all of the records must match the format defined in the rec_format argument. |
|
inline |
Score one or more records against a query.
This scores a single record, or a list of records, against a query returning a scored search result for each record given.
All records are scored and returned, even if they receive a reject score because of errors or invalid or empty data.
| query | The query to run against the records. The query is the same as for a standard search except no table settings are required (they may be given, but are ignored). |
| query_opts | These are the search options for the query. They are the same as for the standard search except those options relating to the prefilter are ignored. |
| rec_format | This is a table definition. It provides the field names, field types and character maps for the fields in the records. A full table definition may be given, but all parts except field names, field types and character maps are ignored. |
| records | One or more records or an array of records. The fields of the records must match the format defined in the rec_format argument. |
|
inline |
Version of search to search a single table.
This sample shows how to perform a search of an ibi™ Patterns - Search table.
| cfg | The search configuration. |
| opts | The search options. |
|
inline |
Perform a search.
Queries are set in the NetricsSearchCfg objects and overall search options are set in the NetricsSearchOpts object
| tblCfgs | One NetricsSearchCfg per table which will be searched (can be specified in any order) |
| opts | The configuration object for the overall search - allows a number of options for searching |
| NetricsException | If the server indicates that an error has occured (Possible errors - ARRAYLEN, TBLNOTFOUND, EXPECTTBLDESC, EXPECTRTBLDESC, EXPECTLIST, EXPECTQUERY, FEATUREOFF, FEATURESET, LISTLEN, LOOKUP, NOTBLDESC, NOQUERY, NSFIELD, NUMFIELDS, PARAMCONFLICT, PARAMMISSING, PARAMVAL, PARTIAL, PREDTYPE, SRCHPARAM, THESNOTFOUND, UNKFIELD) |
|
inline |
Retrieve the server version information.
This returns the complete server version and status information.
|
inline |
Sets the certificate-validation callback.
| certValidator | The callback used to filter certificate validation. |
A custom certificate validator is needed only in unusual circumstances. For example if a self-signed certificate is in use.
See NetricsConMgr.NetricsConMgr.setCertificateValidator(RemoteCertificateValidationCallback) for sample usage.
|
inline |
Changes the connection pooling policy for this NetricsServerInterface object.
Use of this function is not generally recommended.
| policy | The new pooling policy. |
|
inline |
Set the retry count for establishing a socket connection to the engine.
Default is 1. Do not set this value unless you're experiencing platform-specific socket issues.
|
inline |
Set the per-attempt timeout for establishing a socket connection to the engine.
Measured in milli-seconds. Default is 120000 (2 minutes). Do not set this value unless you're experiencing platform-specific socket issues.
|
inline |
Set the maximum lifetime of socket connections to the engine.
Not relevent if connection pooling is turned off. Do not set this value unless you're experiencing platform-specific socket issues.
|
inline |
Set the maximum number of queries to perform on a given socket before closing it.
Not relevent if connection pooling is turned off. Do not set this value unless you're experiencing platform-specific socket issues.
|
inline |
Set the network protocols that will be used to connect to the ibi™ Patterns - Search Server.
| protocols | Which protocols to use. |
*/
|
inline |
Sets the culture used by the interface when formatting and interpreting data exchanged with the server.
Use this only if the server has been set to use a non-English culture. This should only be used on the advice of ibi Patterns support.
| culture_info | The new server culture. Pass null to reset to the default. |
|
inline |
Sets the SSL enable flag.
SSL is disabled by default.
| enable | Pass true to enable SSL, false to disable. |
setCertificateValidator(RemoteCertificateValidationCallback)
|
inline |
Turn off search logging (must be enabled when the server starts up).
| NetricsException | If the server indicates that an error has occured (Possible errors - EXPECTRTBLDESC, IPCERR, IPCTIMEOUT, IPCEOF, HANDSHAKE) |
|
inline |
Turn on search logging (must be enabled when the server starts up).
| NetricsException | If the server indicates that an error has occured (Possible errors - EXPECTRTBLDESC, IPCERR, IPCTIMEOUT, IPCEOF, HANDSHAKE) |
|
inline |
<summary> Perform a noop on the <i>ibi™ Patterns - Search</i> Server.</summary>
This method is the quickest way to determine if the ibi™ Patterns - Search server is responding or not.
This sample code shows how to ping the ibi™ Patterns - Search Server.
| NetricsException | If the server indicates that an error has occured |
|
inline |
Initiates a server shutdown.
|
inline |
Initiates a server shutdown.
| timeout | Time in seconds to wait for the server to free up resources. |
|
inline |
Retreive the ibi™ Patterns - Search Server's version information.
This sample code shows how to specify a connection to the ibi™ Patterns - Search Server and obtain its version.
| NetricsException | If the server indicates that an error has occured |
|
inline |
Delete a table.
Call this method to delete an existing table.
This sample shows how to delete an ibi™ Patterns - Search table.
| tblName | The name of the table to be deleted |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLNOTFOUND, EXPECTTBLDESC, NOTBLDESC, NOSYSINIT) |
|
inline |
Used to load a NetricsTable into the server.
| tbl | The table to be loaded |
This sample shows a way to load an ibi™ Patterns - Search table from a csv file.
| NetricsException | If the server indicates that an error has occured (Possible errors - ARRAYLEN, TBLEXISTS, TBLPARAM, RECEXISTS, CHARMAP, DUPFIELDNAMES, EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FEATURESET, FIELDLENSUM, NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS, PARAMCONFLICT, PARAMVAL, SHUTDOWN) |
|
inline |
Used to load a NetricsTable into the server.
See also: NetricsTable, NetricsServerInterface.tblload(NetricsTable)
| tbl | The table to be loaded |
| doMaxWork | process as many records as possible, ignoring those with errors. |
| NetricsException | If the server indicates that an error has occured (Possible errors - ARRAYLEN, TBLEXISTS, TBLPARAM, RECEXISTS, CHARMAP, DUPFIELDNAMES, EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FEATURESET, FIELDLENSUM, NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS, PARAMCONFLICT, PARAMVAL, SHUTDOWN) |
|
inline |
Create and load a table from a server side CSV file.
| tbl | Defines table to be loaded. Record source is ignored. |
| fileDef | Defines the name and format of the file Containing the records. |
| NetricsException | If the server indicates that an error has occured (Possible errors - ARRAYLEN, TBLEXISTS, TBLPARAM, RECEXISTS, CHARMAP, DUPFIELDNAMES, EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FEATURESET, FIELDLENSUM, NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS, PARAMCONFLICT, PARAMVAL, SHUTDOWN, FILEFORMAT) |
Sample code
|
inline |
Rename a table.
Call this method to rename an existing table. Note that if the table with the name
already exists, it will be deleted, and replaced by the table that you are renaming.
This sample shows how to rename an ibi™ Patterns - Search table.
| oldName | The name of the table that will be renamed |
| newName | The new name of the table |
| NetricsException | If the server indicates that an error has occured (Possible errors - TBLMOVESAME, TBLNOTFOUND, EXPECTTBLDESC, FEATURESET, NOTBLDESC, NOSYSINIT) |
|
inline |
Create a thesaurus in the ibi™ Patterns - Search Server.
This sample shows how to create a thesaurus in an ibi™ Patterns - Search Server.
| thes | The NetricsThesaurus object to create on the ibi™ Patterns - Search Server. The name and synonyms of the thesaurus are defined by using the thesaurus object's methods. |
| NetricsException | If the server indicates that an error has occured (Possible errors - ARRAYLEN, CHARMAP, EXPECTTHESNAME, EXPECTLIST, FEATURESET, IOERROR, PARAMVAL, PARAMMISSING) |
|
inline |
Delete one or more thesauri currently loaded on the server.
This deletes all of the thesauri given (all thesauri on the server if null is passed).
This sample shows how to delete a thesaurus in an ibi™ Patterns - Search Server.
| theslist | The names of the tables to be deleted. Pass null to delete all thesauri on the server. |
| NetricsException | If the server indicates that an error has occured (Possible errors - NODBDESC, THESNOTFOUND, EXPECTLIST, FEATURESET, PARAMVAL, INTERNAL, NOSYSINIT) |
|
inline |
Lists statistics on thesauri currently loaded on the server.
| thes_names | The names of the thesauri to be listed. Pass null to list all thesauri on the server. |
| NetricsException | If the server indicates that an error has occured (Possible errors - THESNOTFOUND, EXPECTLIST, PARAMVAL, NOTBLDESC, NOSYSINIT) |
|
inline |
Lists the thesauruses currently loaded in the ibi™ Patterns - Search Server.
This sample shows how to list all thesauri in an ibi™ Patterns - Search Server.
| NetricsException | If the server indicates that an error has occured (Possible errors - THESNOTFOUND, EXPECTLIST, PARAMVAL, NOTBLDESC, NOSYSINIT) |
|
inline |
Abort a transaction.
This method aborts the transaction with the given transaction id. If the call to the server should fail a NetricsException is thrown, the error code and message being set to the values returned by the server.
| NetricsException | If the server indicates that an error has occured. |
|
inline |
Commit a transaction.
This method commits the transaction with the given transaction id. If the given transactions has errors this call will fail. If the call to the server should fail a NetricsException is thrown, the error code and message being set to the values returned by the server.
| NetricsException | If the server indicates that an error has occured. |
|
inline |
Commit a transaction even if it has errors.
This method commits the transaction with the given full transaction id, forcing the commit even if there were errors. If the call to the server should fail a NetricsException is thrown, the error code and message being set to the values returned by the server.
| NetricsException | If the server indicates that an error has occured. |
|
inline |
Set the idle transaction processing parameters on the server.
This method is used to set the parameters that control how idle transactions are treated on the server. Transactions that sit idle for long periods of time can be cleaned up automatically by the server. These parameters define how that clean up processing is performed.
A transaction is idle when no commands are being run under that transaction. The idle time is the time from the completion of the last command associated with the transaction to the present time.
The purpose of idle transaction clean up is to take care of transactions that were abandoned, e.g. an application crashed in the middle of the transaction and thus will never close it. These parameters can be set from command line arguments when the server is started, so generally it is not necessary to do so from the API.
The server doesn't guarantee that a transaction will be cleaned up as soon as it exceeds the idle time. Checks are made on a periodic basis, so transactions may be idle for some seconds past the maximum before they are detected.
| idle_time | This defines how many seconds a transaction must sit idle before the clean up action is performed. If this value is zero the max idle time is considered to be infinite (i.e. no clean up is performed). If this value is less than zero the max idle time parameter is left unchanged. |
| action | This defines the action to be performed on all transactions that exceed the maximum idle time. It is a one character flag with values: a abort the transaction, c commit the transaction, e abort the transaction if it has errors, otherwise commit the transaction, n do nothing. If this argument is null, an empty string or a single blank character the parameter is left unchanged. |
| NetricsException | If the server indicates that an error has occured. |
|
inline |
Update records from a server side file.
This will add the given records if they do not already exist, or replace them if they do exist.
| tblName | Defines table to be loaded. |
| fileDef | Defines the name and format of the file Containing the records. |
| NetricsException | If the server indicates that an error has occured (Possible errors - same as recadd) |
|
inline |
Create a weighted dictionary in the ibi™ Patterns - Search Server.
A Thesaurus is used for word substitution such as synonyms or related terms.
A Weighted Dictionary is a variant of a Thesaurus which can reduce the contribution of a synonym in the overall score.
A Combined Thesaurus combines the features of a Thesaurus and a Weighted Dictionary and can apply a penalty score to be applied to each Thesaurus class.
This sample code shows how to create a Weighted Dictionary in the ibi™ Patterns - Search Server running on the localhost listening to port 5051.
| wdict | The NetricsWeightedDictionary object to create on the ibi™ Patterns - Search Server. The name and synonyms of the thesaurus are defined by using the thesaurus object's methods. |
| NetricsException | If the server indicates that an error has occured (Possible errors - ARRAYLEN, CHARMAP, EXPECTTHESNAME, EXPECTLIST, FEATURESET, IOERROR, PARAMVAL, PARAMMISSING) |