Open topic with navigation

TIBCO® Patterns 6.1.2

# Invoking TIBCO Patterns Matching (lkt_dbsearch)

    The following command finds matches for a given query over a list of databases. It returns statistics, matching records, and per-match information.
    dvkerr_t lkt_dbsearch( lpar_t host, lpar_t names, lpar_t dbparlists,
                            lpar_t query, lpar_t srchpars, lpar_t *stats,
                       lpar_t *matches, lpar_t *minfo );

The dbsearch command supports many different types of queries, from simple single text block queries to advanced query expressions with complex specification of scoping and weighting.

In its simplest form, a query is a single block of text which is used to search all selected fields of all databases in names. Query expressions allow different blocks of query text to be specified for different fields of each record.

For a full discussion of query building, see Query Construction.

## Input

## host (optional)

This is used to identify the server. For more information, see Communicating with TIBCO Patterns Servers.

## names (required)

is a database name or a list of database names (LPAR_STR_DBDESCRIPTOR's) of those databases that is included. These databases must all be currently loaded, and not have searches locked out (see Blocking Operations On a Database (lkt_dblock, lkt_dbunlock)). There must be at least one name.

## dbparlists (optional)

are database-specific search parameters. The dimensionality of this list must be one higher than that of the names. If names is a single database (not a list), dbparlists must be a single list of database parameters.

If names is a list of databases, dbparlists must be a list of lists of database parameters, one for each database in desclist. The entries in names and the parameter lists in dbparlists are associated in one-to-one fashion. If no such parameters are to be passed for any database, the value of dbparlists can be LPAR_NULL. If names is a list and no parameters are needed for a particular database the corresponding list element can be LPAR_NULL.

Note: It is perfectly legal to append the value LPAR_NULL to the following list:
Note: lpar_append_lst(dbparlists, LPAR_NULL);

Possible database specific parameters are listed as follows:

| • | LPAR_LST_JOIN specifies the type of join to be used for this query. The content of this list is described in the specifying a join section.

Default Value: No join is used.

| • | LPAR_INTARR_SELECTFLDS controls field selection for this query. All query field references in fuzzy text matching queries are restricted to using these fields. This also defines the default set of fields for all fuzzy matching text queries. This affects only the current query.

Note: The use of integer field selections is discouraged. The fields must be selected by field names.

Each of the integer values is interpreted as a field number, with fields numbered starting from zero. For a joined search fields are numbered starting with the parent table and continuing across each child table in the order given in the child tables list. For child tables the key and parent key count as fields in the numbering order (but cannot be used in a search). They appear as the first and second field of the child table respectively. For example, given a join across a parent table with three data fields, a child table with two data fields and a second child table with three data fields, the array [0, 5, 11] would select the first data field from the parent table, the first data field from the first child table, and the third data field from the second child table.

Note: It is an error to give both LPAR_INTARR_SELECTFLDS and LPAR_STRARR_FIELDNAMES.
Note: All fields selected must be of type LKT_FLD_TYPE_SRCHTEXT or LKT_FLD_TYPE_ATTRIBUTES.

Default value: All fields of type LKT_FLD_TYPE_SRCHTEXT or LKT_FLD_TYPE_ATTRIBUTES are selected.

| • | LPAR_STRARR_FIELDNAMES controls field selection for this query. This is similar to the LPAR_INTARR_SELECTFLDS value, except that it identifies fields by name. Attribute names are not used. This is preferred over the use of LPAR_INTARR_SELECTFLDS. It is an error to give both LPAR_INTARR_SELECTFLDS and LPAR_STRARR_FIELDNAMES.

| • | LPAR_LST_DEDUPQUERY is deprecated and is not be used in new code. This list must contain a single LPAR_STR_RECKEY value. This defines the record to use as the search criteria for the SORT prefilter. If using the SORT prefilter, this value replaces the LPAR_BLKARR_SORTLOOKUPFIELDS in the search parameters. This value must not be specified if LPAR_BLKARR_SORTLOOKUPFIELDS is specified. This value is ignored if the GIP or PSI prefilter is used.

| • | LPAR_LST_PREDICATE, LPAR_STR_PREDICATE or LPAR_BLK_PREDICATE defines a predicate expression used to select records to be searched. Records that fail to pass the predicate expression test are not considered for the query. Because of the complexity of predicate expressions, they are discussed separately in section Predicate Expressions.

Default value: all records are considered.

| • | LPAR_INT_LOCKKEY enables a search to go through on a database containing a keyed lock if the key value matches the lock value. Locks are deprecated and are not to be used in new code.

## specifying a join

To query across a joined set of tables the parent table is specified in names and a join specification is added to the dbparlists. A join specification is an LPAR_LST_JOIN list containing the following values:

| • | LPAR_STR_PARENT_TBL is the name of the parent table. This is optional and if it is given it must be the same table as specified in the names parameter.

| • | LPAR_INT_JOINTYPE specifies the type of join operation. This is required and is one of the following values:

LKT_JOIN_SEARCH_OFF is a standard search against a single table.

LKT_JOIN_SEARCH_ON[|LKT_JOIN_ALLOW_PARTIALS][|LKT_JOIN_ALLOW_ORPHANS] is a join search across a parent table and one or more child tables.

The LKT_JOIN_SEARCH_ON value can be or’ed with either LKT_JOIN_ALLOW_PARTIALS or LKT_JOIN_ALLOW_ORPHANS.

If LKT_JOIN_ALLOW_PARTIALS is given records missing one or more child tables are included in the output, otherwise only full records are included. If LKT_JOIN_ALLOW_ORPHANS is given orphan child records, not associated with any parent record, are included in the output, otherwise orphan child records are not considered.

| • | LPAR_BOOL_MULTI_PARENT_JOIN if true each qualifying combination of parent and child records is returned, otherwise only the single best combination for each parent record is returned. This is optional and its default value is false.

| • | LPAR_STRARR_CHILD_TBLS specifies the list of one or more child tables to be included in the join. All tables must be a child table of the table specified in the LPAR_STR_PARENT_TBL. The same child table can be specified multiple times. If a child table is specified multiple times, a unique alias must be assigned for each occurrence.

| • | LPAR_STRARR_TBL_ALIASES specifies an alias name for each child table. This is required only if the same child table is specified multiple times in the LPAR_STRARR_CHILD_TBLS list. If this list is given, all table name references in the query and predicate expressions must use this alias value instead of the actual table name. The length of this list must be the same as the length of the LPAR_STRARR_CHILD_TBLS list. All entries must be non-null, non-empty values. All entries in this list must be unique. An entry in this list cannot be the same as the name of a table in the LPAR_STRARR_CHILD_TBLS list at a different index position. The default value for this is the same as the LPAR_STRARR_CHILD_TBLS entries.

## query (required)

is the query. This might be either a single query, or a list of queries. When this parameter is a list of queries, one query is expected for each database in name. When this is a single query, the same query is used for every database in names. Details of query construction are covered in Query Construction.

## srchpars (optional)

is a list of lpars specifying general (non-database specific) search parameters. Every one of these parameters has a default value, so it is not strictly necessary to pass a srchpars list to lkt_dbsearch. If the default values are satisfactory, simply pass the value LPAR_NULL instead.

A number of the values here set default values for query options. These defaults can be overridden on a per query basis by setting them in the query.

Here is the list of search parameters and their default values:

| • | LPAR_INT_MATCHESREQ sets the maximum number of matching records to be returned. The `lkt_dbsearch` command returns this number, if possible; but it might return less.

Note: Fewer records are returned if the number of records in the searched databases satisfying the selection predicate (if any) is smaller than the number of matches requested (also taking into account the value of LPAR_INT_STARTMATCH) or if a cutoff has been specified.

Default value: 25

| • | LPAR_INT_STARTMATCH sets the rank (1-based) of the first match in the list of matching records to be returned (for example, a value of 11 asks for a match list beginning with the eleventh-best match).

Default value: 1

| • | LPAR_INT_SORTSCORE sets the score type to use for record ranking. See Score Types for more on score types.

Default value: LKT_SCORE_NORMAL

| • | LPAR_BOOL_FAILBADPRED controls the behavior of predicate evaluation failure in filtering predicates. When this value is true, records which cannot be evaluated are excluded from the search. When this value is false, records are searched if predicate evaluation fails. See Controlling Predicate Error Handling for more discussion of the meaning of this lpar.

Default value: true

| • | LPAR_BOOL_FAILEMPTYPRED controls the behavior of predicate evaluation on empty field values in filtering predicates. When this value is true, tests on empty record field values are considered to be invalid and the predicate test fails with a "empty value" error. The behavior is then controlled by the value of the LPAR_BOOL_FAILBADPRED setting. When this value is false empty field values are treated as any other value and the predicate test is performed. See Controlling Predicate Error Handling for more discussion of the meaning of this lpar.

Default value: true

| • | LPAR_DBL_INVALID_DATA_SCORE is the score returned by predicate and custom scoring queries if the record or query contains invalid data. You should consult your TIBCO representative before setting this parameter.

Default value: 0.0

| • | LPAR_DBL_EMPTY_DATA_SCORE is the score returned by a query if the record or query contains empty data. You should consult your TIBCO representative before setting this parameter.

Default value: 0.0

| • | LPAR_BOOL_MATCH_EMPTY controls behavior when a query string and the data it is being matched to are both empty. If true, a 1.0 score is generated. If false, the empty-score is used.

Default: false

| • | LPAR_INT_VISUALSTYLE selects the visualization style for matching records. Currently, the only legal values for this parameter are 0, 2, and 256. A value of 0 is the null style (no visualization information are returned). See Match Visualization for a detailed discussion of visualization style 2 and visualization style 256 and other search options associated with them.

Default value: 0 (no visualization)

| • | LPAR_LST_TIEBREAKS selects custom tie breaking rules. See Tie Breaking for more information on custom tie breaks.

Default value: Tie break first on symmetric score, then on record Key.

| • | LPAR_LST_CUTOFF selects the dynamic score cutoff method. See Dynamic Score Cutoffs for more information on dynamic score cutoffs.

Default value: No cutoff is applied.

| • | LPAR_STR_THESAURUSNAME selects the default thesaurus used to compare records. See Thesaurus Matching for more information about TIBCO Patterns servers' thesaurus support. Only one of LPAR_STR_THESAURUSNAME or LPAR_LST_THESAURUS might be specified.

Default value: none (no thesaurus)

| • | LPAR_LST_THESAURUS defines a default thesaurus used to compare records. The content of the list consists of two lpars, these being exactly the same as the `thesaurus_options` and `thesaurus_data` arguments for the `lkt_create_thesaurus` command. See Thesaurus Matching for more information about these arguments and TIBCO Patterns servers' thesaurus support in general. The thesaurus defined exists only for the duration of the query and is local to the query. See Ephemeral Thesauri for more information on these ephemeral thesauri in particular. Only one of LPAR_STR_THESAURUSNAME or LPAR_LST_THESAURUS might be specified.

Default value: none (no thesaurus)

| • | LPAR_DBL_THESAURUSWEIGHT sets the default weight given to a thesaurus match compared to a non-thesaurus match of equal quality. See Thesaurus Matching for more information about TIBCO Patterns servers' thesaurus support.

Default value: 1.0 (equal weight)

| • | LPAR_STR_CHARMAP is the name of a character map to be used for all queries. It might be necessary to set this value if you need to perform a single simple or cognate query across multiple fields with different character maps.

Extreme caution must be used when setting this value. You should not set this value without consulting your TIBCO representative. See Character Mapping for more information on character maps.

Default value: Character map for the field being queried.

| • | LPAR_STR_RLMODELNAME is the default Learn model to use for all Learn queries. See Using a Learn Model in a Search for a description of this parameter.

Default value: none, if using Learn queries it must be given either here or with the Learn query.

| • | LPAR_LST_RLPREDLIST (Deprecated) is an obsolete method of adding Predicate queries to a Learn query. Use Predicate queries instead.

Default value: No Predicate queries added.

| • | LPAR_BOOL_RLUSESSYMSCORES (Deprecated) when given and true, the default match score type is Symmetric instead of Normal.

Default value: false, use Normal score as the default.

| • | LPAR_DBL_NONCOG_WGT is the default non-cognate field weight for all cognate queries. See Cognate Query for a description of the non-cognate weight.

| • | LPAR_LST_QOPTS is the default set of options for all queries. Most of these options provide for highly detailed control over how the TIBCO Patterns server performs matching allowing it to be tuned for unusual situations. Nothing should be changed without consulting your TIBCO representative.

| • | LPAR_BOOL_DOMAXWORK effects the return in the case of a multi-database search if some but not all of the databases are not found. With a value of true, results are returned from whatever databases are found. The search returns a DVK_ERR_PARTIAL error code, along with a list of unavailable databases. With a value of false, results are returned only if all databases are present.

When working through a gateway on a federated table setting this flag to true cause any search to return partial success if one or more nodes are unreachable. A result of partial success means only a subset of the entire table was searched when searching a federated table. For more information about gateways and federated tables, see Federated Tables and Gateways.

Partial results are not valid results as they represent a search over an unknown portion of the total data. Therefore, use of this flag is extremely rare and should be done only after careful consideration.

Default value: false

| • | LPAR_BOOL_GIPSEARCH controls whether the GIP prefilter is enabled for this search.

Default value: true if GIP prefilter is enabled for the table being searched.

| • | LPAR_BOOL_SORTSEARCH Controls whether the SORT prefilter is used. See The SORT Prefilter - Usage Details for details on this and other parameters associated with the SORT prefilter.

Default value: true if SORT prefilter is enabled for the table being searched.

| • | LPAR_BOOL_PSISEARCH Controls whether the PSI prefilter is used. See The PSI Prefilter - Usage Details for details on this and other parameters associated with the PSI prefilter.

Default value: true if PSI prefilter is enabled for the table being searched.

| • | LPAR_INT_PSI_DENSITY Controls PSI suffix density for queries on PSI-indexed tables. See The PSI Prefilter - Usage Details for a full discussion of this parameter.

| • | LPAR_BLKARR_SORTLOOKUPFIELDS Sets the search criteria for the SORT prefilter. See The SORT Prefilter - Usage Details for details of this and other parameters associated with the sort filter. If using the SORT prefilter either this value or LPAR_LST_DEDUPQUERY in the database parameters might be required. If it is not given, the TIBCO Patterns server attempts to infer the lookup fields from the query. If it cannot do so, an error is returned.

| • | LPAR_BLKARR_PSILOOKUPFIELDS Sets the search criteria for the PSI prefilter. See The PSI Prefilter - Usage Details for details of this and other parameters associated with the PSI filter. If using the PSI prefilter this value might be required. If this value is not given, the TIBCO Patterns server attempts to infer the lookup fields from the query. If it cannot do so, an error is returned.

| • | LPAR_INT_FETCH_SIZE sets the size of the candidate set selected by the GIP, SORT, or PSI prefilter. This value should not be set unless directed to do so by your TIBCO technical representative.

Default value: dynamically calculated

| • | LPAR_INT_PC_SIZE this value is used for tuning query performance, it shouldn't be set unless you are directed to do so by your TIBCO technical representative.

| • | LPAR_INT_QC_SIZE value is used for tuning query performance, it is not to be set unless you are directed to do so by your TIBCO technical representative.

| • | LPAR_BOOL_DETAILEDSTATS request more detailed statistics information. If set true more detailed information on internal performance data is returned. This should not be set unless instructed to do so by your TIBCO representative as it has significant impact on the performance.

Default value: false

| • | LPAR_INT_GPU_PARALLELISM is the number of parallel GPU channels to use per query. If the value is outside the range accepted by the server, it is clamped to the nearest acceptable value.

Minimum value: 1, Maximum value: 6, Default value: 4

| • | LPAR_INT_INT_GPU_B_P_K is the number of memory blocks to use per GPU unit. If the value is outside the range accepted by the server, it is clamped to the nearest acceptable value. Minimum value: 4, Maximum value: 192. The default is calculated by the server based on the GPU hardware. Overriding the server's default calculation is likely to reduce performance. Ignored for Join queries.

| • | LPAR_BOOL_DBGIPGPU if true employ GPU units to speed GIP processing, if false, disables GPU processing for this query. A FEATURESET error is returned if GPU is not enabled for all of the queried tables.

## Output

## stats (required)

is a list of lpars giving statistics related to the just-completed matching. It includes the following lpars (other advanced search statistics might also be present):

| • | LPAR_INT_MATCHESRET is the actual number of matches returned in the matches list.

| • | LPAR_INT_VISUALSTYLE is the visualization style. See Match Visualization for more information on visualization

| • | LPAR_BLK_HTMLLEGEND is an HTML segment that can be used as a key to interpret the HTML-formatted text of visualization style 256. See Match Visualization for more information regarding visualization. Returned only if visualization style 256 is selected.

| • | LPAR_BOOL_GIPSEARCH tells whether the GIP prefilter was used for this query.

| • | LPAR_BOOL_DBGIPGPU true if GPU acceleration was used in the search. This does not appear if GPU acceleration is not available with this server.

| • | LPAR_BOOL_SORTSEARCH tells whether the SORT prefilter was used for this query.

| • | LPAR_BOOL_PSISEARCH tells whether the PSI prefilter was used for this query.

| • | LPAR_STRARR_FIELDNAMES is a list of the field names for the table or tables queried, in the order they appear in the returned records. For joined searches, the key and parent key of each child record is included in the list as the first two fields of the child record. The key appears first and has the name "table-name". Where table-name is the name of the child table. It is followed by a period. The parent key appears second and has the name “table-name.^parent”, where table-name is the name of the child table. If aliases for the child tables were specified the alias name is used for table-name.

For example:

A parent table with fields: “first”, “last”

A child table (addresses) with fields: “street”, “city”, “state”

A second child table (phones) with field: “phone”

An alias list “a”, “p”

The output field name list is:

first, last, a., a.^parent, a.street, a.city, a.state, p., p.^parent, p.phone

| • | LPAR_INTARR_FIELDTYPES is a list of the field types for the database(s) given in the same order that they appear in the returned records. See The TIBCO Patterns Table for information on field types.

| • | LPAR_DBL_SEARCHTIME is the number of seconds of CPU time used by the process during matching. On most platforms this value is meaningful only if no other commands were being run in parallel with this query.

| • | LPAR_DBLARR_FILTERTIMES is a breakdown of seconds of CPU time by different steps of the search.

| • | LPAR_STRARR_FILTERTIME_NAMES are the names of the search steps reported in LPAR_DBLARR_FILTERTIMES.

| • | LPAR_INTARR_FILTEROUTSIZES are the number of records output by each filter step.

| • | LPAR_STRARR_FILTEROUT_NAMES are the names of the search steps reported in LPAR_DBLARR_FILTEROUTSIZES.

| • | LPAR_STRARR_QLETNAMES is a list of names of all of the named querylets in the query. These are given in the same order as the scores in the LPAR_DBLARR_NAMEDQLETSCORES entry in the minfo values.

| • | LPAR_DBL_MIN_CONFIDENCE is the minimum confidence value seen during the query processing. This might be the confidence value of a record that is not returned in the result set. Confidence is relevant only if a TIBCO Patterns Learn Model is used.

| • | LPAR_DBL_RESULT_CONFIDENCE is the minimum confidence value of any of the records returned in the return set. Confidence is relevant only if a TIBCO Patterns Learn Model is used.

## matches (required)

is a list of records, ranked by the TIBCO Patterns servers according to their likeness to the query. Each record is returned with its key and complete data. All of this information might be retrieved using the record selector functions described above in Processing the Output of DevKit Commands.

## minfo (optional)

is a list of lists of lpars, one lpar list per record returned in matches. Each lpar list can include the following lpars:

| • | LPAR_INT_MATCHRANK is the rank (1-based) of this matching record.

Note: A rank of n does not necessarily mean that this is the nth item in the matches list. If you set the value of LPAR_INT_STARTMATCH to something other than its default of 1, for example 21, then the first item in matches have a match rank of 21.

| • | LPAR_STR_SRCDATABASE is the name of the source data base for this record. For a join, this is also the name of the parent table in the joined set of tables.

| • | LPAR_BLK_DBINFO is the database info block associated with the source database, if such a block was defined at database load time.

| • | LPAR_DBL_MATCHSCORE is the match score of this matching record, which is always a value between 0.0 and 1.0 (larger values indicate better matches). A full discussion of match scores is in An Explanation of Match Scores.

| • | LPAR_DBL_NORMMATCHSCORE is the normal match score of this matching record, which is always a value between 0.0 and 1.0 (larger values indicate better matches). A discussion of different types of match scores is in Score Types.

| • | LPAR_DBL_SYMMATCHSCORE is the symmetric match score of this matching record, which is always a value between 0.0 and 1.0 (larger values indicate better matches).

| • | LPAR_DBL_REVMATCHSCORE is the reverse match score of this matching record, which is always a value between 0.0 and 1.0 (larger values indicate better matches).

| • | LPAR_DBL_MINMATCHSCORE is the minimum match score of this matching record, which is always a value between 0.0 and 1.0 (larger values indicate better matches).

| • | LPAR_DBL_MAXMATCHSCORE is the maximum match score of this matching record, which is always a value between 0.0 and 1.0 (larger values indicate better matches).

| • | LPAR_DBL_ITMATCHSCORE is a score from 0 to 1.0 indicating the information theoretic score for this record. Contact your TIBCO representative if you're interested in learning how IT scores are computed.

| • | LPAR_DBL_RLRLINKSCORE is a score from 0 to 1.0 indicating the TIBCO Patterns machine learning model score for this record. This is outputted only for Learn queries.

| • | LPAR_DBL_RLRECORDSCORE is a score from 0 to 1.0 indicating the raw match strength of the record before the TIBCO Patterns machine learning model was applied. This is outputted only for Learn queries.

| • | LPAR_DBLARR_RLFEATUREVEC feature scores the TIBCO Patterns machine learning model used in determining an overall score.

| • | LPAR_DBLARR_RLSIGNIFICANCES is a relative measure of importance that the Patterns machine learning model assigned to each feature in the input feature list. Each value is a number in the range of 0 (least important) - 1.0 (most important). This is returned only if a Learn Model is employed and the model determined that this record is a matching record.

| • | LPAR_DBL_RLCONFIDENCE is the confidence the TIBCO Patterns Learn Model has in the score it generated. Values are in the range of 0.0 (no confidence at all) to 1.0 (fully confident).

| • | LPAR_DBLARR_MATCHSCORE_QLT is an array of match scores, one for each querylet used in the search. Each element in the array is the quality of a match between that querylet and the record. These scores are combined to give the overall match score (LPAR_DBL_MATCHSCORE). Only query combiners output querylet scores.

| • | LPAR_DBLARR_NORMMATCHSCORE_QLT is an array of normal match scores, one for each querylet used in the search. Each element in the array is the quality of a match between that querylet and the record. These scores are combined to give the overall normal match score (LPAR_DBL_NORMMATCHSCORE). Only query combiners output querylet scores.

| • | LPAR_DBLARR_SYMMATCHSCORE_QLT is an array of symmetric match scores, one for each querylet used in the search. Each element in the array is the quality of a match between that querylet and the record. These scores are combined to give the overall symmetric match score (LPAR_DBL_SYMMATCHSCORE). Only query combiners output querylet scores.

| • | LPAR_DBLARR_REVMATCHSCORE_QLT is an array of reverse match scores, one for each querylet used in the search. Each element in the array is the quality of a match between that querylet and the record. These scores are combined to give the overall reverse match score (LPAR_DBL_REVMATCHSCORE). Only query combiners output querylet scores.

| • | LPAR_DBLARR_MINMATCHSCORE_QLT is an array of minimum match scores, one for each querylet used in the search. Each element in the array is the quality of a match between that querylet and the record. These scores are combined to give the overall minimum match score (LPAR_DBL_MINMATCHSCORE). Only query combiners output querylet scores.

| • | LPAR_DBLARR_MAXMATCHSCORE_QLT is an array of maximum match scores, one for each querylet used in the search. Each element in the array is the quality of a match between that querylet and the record. These scores are combined to give the overall maximum match score (LPAR_DBL_MAXMATCHSCORE). Only query combiners output querylet scores.

| • | LPAR_DBLARR_ITMATCHSCORE_QLT is an array of information theoretic scores, one for each querylet used in the search. Each element in the array is the quality of a match between that querylet and the record. These scores are combined to give the overall reverse match score (LPAR_DBL_ITMATCHSCORE). Only query combiners output querylet scores.

| • | LPAR_INT_QALIGN is the alignment offset for simple and cognate queries. This defines the number of character positions the query was offset when matching the record value. This is output only if the top level query was a simple or cognate query. No meaningful value exists for query combiners. (See Query Construction for a discussion of simple, cognate and query combiners.)

| • | LPAR_DBLARR_NAMEDQLETSCORES contains the sort score for all the named querylets in the query. The scores are given in the same order as the names in the LPAR_STRARR_QLETNAMES entry in the returned stats.

| • | LPAR_DBLARR_NAMEDQLETCONFIDENCES contains the confidence measure output by all named querylets in the query. The measures are given in the same order as the names in the LPAR_STRARR_QLETNAMES entry in the returned stats.

| • | LPAR_DBLARR_V2V is an array of character match strengths. It gives an overall match strength for each character in the searchable text of this record. Output only if visualization style 2 is selected. See Match Visualization for more information on match visualization.

| • | LPAR_INTARR_V2P is an array of match block size for each character in the searchable text of the record. It gives the number of characters in the matched block of characters containing this character. See Match Visualization for more information on match visualization.

| • | LPAR_INTARR_V2D is an array of displacements for each character in the searchable text of the record. It gives the displacement of the record character relative to the query character. See Match Visualization for more information on match visualization.

| • | LPAR_INTARR_V2N is an array of noise flags for each character in the searchable text of the record. It is 1 if this character was deemed to be noise (a randomly matched character of no value), otherwise zero. See Match Visualization for more information on match visualization.

| • | LPAR_BLK_HTML is the matching record's searchable text containing HTML tags for visualization. It is returned if the visualization style is 256, see Match Visualization for customization options.

| • | LPAR_INTARR_HTMLFLDS is the lengths of the record fields, in bytes, in the LPAR_BLK_HTML value. It can be used to split this value into individual field values. It is returned if the visualization style is 256. See Match Visualization for more information on visualization.

| • | LPAR_STR_MATCHTYPE is a string containing the match type. Currently this is always typographic.

| • | LPAR_BOOL_TRAN_DIRTY is set to true if this record is modified by an open transaction.

In addition to those listed here there might be additional items that are used internally by the TIBCO Patterns servers.

If you wish to ignore this extra match info, you can pass a NULL pointer as minfo to `lkt_dbsearch`.

Error codes and items returned by lkt_dbsearch

ARRAYLEN | array lpar with wrong number of values
DBNOTFOUND | name of non-existent database
EXPECTDBDESC | item that should have been a table name
EXPECTLIST | item that should have been a list lpar
EXPECTQUERY | item that should have been a search query
EXPIRED | (none)
FEATURESET | lpar applicable to a premium feature not available
INTERNAL | item being processed at time of error
JOINSET | lpar containing bad set of joined tables.
LISTLEN | list (dbparlists) that has the wrong number of items
LOOKUP | (none) (error in search operation)
LOOKUP_FIELDS_NEEDED | search parameters missing lookup fields
MODEL_UNSUPPORTED | (none)
NOCHARMAP | character map that doesn't exist
NODBDESC | (none)
NOQUERY | (none)
NORLINKMODEL | Learn model name lpar
NOSYSINIT | (none)
NOWGTFLD | query expression missing the LPAR_STR_WGTFLD_NAME
NSFIELD | field selection lpar
NUMFEATURESMISMATCH | Learn expression lpar
PARAMCONFLICT | lpar that contains a conflicting parameter
PARAMMISSING | the list missing a required item
PARAMTYPE | lpar with invalid ID
PARAMVAL |
PARTIAL | list of unavailable databases
PREDSTRING | LPAR_STR_ERRORDETAILS details on syntax error
PREDTYPE | lpar that contains a non-Boolean predicate
QLETREFBROKEN | LPAR_STR_QLETNAME item containing name of querylet that could not be found.
QLETREFLOOP | (none)
QUERYEXPR | lpar that contains the query specification
RECNOTFOUND | list that was missing a valid record key
SRCHPARAM | item that should have been a search parameter
THESNOTFOUND | name of thesaurus not found
UNKFIELD | A field name lpar containing an unknown field name

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Patterns

Copyright © 2010-2025. Cloud Software Group, Inc. All Rights Reserved.