Skip to main content

%iKnow.Queries.SourceQAPI

Class %iKnow.Queries.SourceQAPI Extends %iKnow.Queries.AbstractQAPI [ Deprecated, System = 4 ]

This is an automatically generated class, offering a functionally equivalent set of methods and queries as %iKnow.Queries.SourceAPI, exposed as SqlProc methods.

See the classdocs for %iKnow.Queries.SourceAPI for more information.

Methods

GetAttributesExecute

ClassMethod GetAttributesExecute(ByRef qHandle As %Binary,  pDomainId As %Integer, pSrcId As %Integer, pPage As %Integer = 1, pPageSize As %Integer = 10, pTypes As %String(MAXLEN=32767) = "", pLevel As %Integer = {$$$IKATTLVLANY}) As %Status [ Internal ]

Returns all the attributes of the Entity Occurrences, Paths and Sentences enclosed in the specified source, optionally filtered by level through pLevel and/or pType.

Please note the startPos and span result columns refer to positions within the path for path-level attributes (level=$$$IKATTLVLPATH) and sentence positions for the other attributes (level=$$$IKATTLVLSENT).

GetAttributesFetch

ClassMethod GetAttributesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetAttributesExecute ]

GetAttributesClose

ClassMethod GetAttributesClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetAttributesExecute ]

GetByCrcIdsExecute

ClassMethod GetByCrcIdsExecute(ByRef qHandle As %Binary,  domainid As %Integer, crcidlist As %String(MAXLEN=32767), page As %Integer = 1, pagesize As %Integer = 10, filter As %String(MAXLEN=32767) = "", setop As %Integer = {$$$UNION}, sortByField As %String(MAXLEN=32767) = "") As %Status [ Internal ]

Retrieves all sources containing the given CRC ids.

See also GetByEntities for a description of the parameters.

GetByCrcIdsFetch

ClassMethod GetByCrcIdsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetByCrcIdsExecute ]

GetByCrcIdsClose

ClassMethod GetByCrcIdsClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetByCrcIdsExecute ]

GetByCrcMaskExecute

ClassMethod GetByCrcMaskExecute(ByRef qHandle As %Binary,  domainid As %Integer, head As %String(MAXLEN=32767) = {$$$WILDCARD}, relation As %String(MAXLEN=32767) = {$$$WILDCARD}, tail As %String(MAXLEN=32767) = {$$$WILDCARD}, page As %Integer = 1, pagesize As %Integer = 10, filter As %String(MAXLEN=32767) = "", sortByField As %String(MAXLEN=32767) = "", pActualFormOnly As %Boolean = 0) As %Status [ Internal ]

Retrieves all sources containing a CRC satisfying the given CRC Mask.

See also GetByEntities for a description of the parameters.

GetByCrcMaskFetch

ClassMethod GetByCrcMaskFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetByCrcMaskExecute ]

GetByCrcMaskClose

ClassMethod GetByCrcMaskClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetByCrcMaskExecute ]

GetByCrcsExecute

ClassMethod GetByCrcsExecute(ByRef qHandle As %Binary,  domainid As %Integer, crclist As %String(MAXLEN=32767), page As %Integer = 1, pagesize As %Integer = 10, filter As %String(MAXLEN=32767) = "", setop As %Integer = {$$$UNION}, sortByField As %String(MAXLEN=32767) = "") As %Status [ Internal ]

Retrieves all sources containing the given CRCs.

See also GetByEntities for a description of the parameters.

GetByCrcsFetch

ClassMethod GetByCrcsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetByCrcsExecute ]

GetByCrcsClose

ClassMethod GetByCrcsClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetByCrcsExecute ]

GetByDomainExecute

ClassMethod GetByDomainExecute(ByRef qHandle As %Binary,  domainid As %Integer, page As %Integer = 1, pagesize As %Integer = 10, filter As %String(MAXLEN=32767) = "", sortByField As %String(MAXLEN=32767) = "") As %Status [ Internal ]

Returns all sources within a domain, optionally filtered through a %iKnow.Filters.Filter object passed in as filter.

GetByDomainFetch

ClassMethod GetByDomainFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetByDomainExecute ]

GetByDomainClose

ClassMethod GetByDomainClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetByDomainExecute ]

GetByEntitiesExecute

ClassMethod GetByEntitiesExecute(ByRef qHandle As %Binary,  domainid As %Integer, entitylist As %String(MAXLEN=32767), page As %Integer = 1, pagesize As %Integer = 10, filter As %String(MAXLEN=32767) = "", setop As %Integer = {$$$UNION}, attributeFilter As %String(MAXLEN=32767) = "", sortByField As %String(MAXLEN=32767) = "", pActualFormOnly As %Boolean = 0) As %Status [ Internal ]

This method will retrieve all sources containing any (if setop = $$$UNION) or all (if setop = $$$INTERSECT) of the entities supplied through entitylist.

The scope of this query can be limited through supplying a %iKnow.Filters.Filter object for the filter parameter to restrict the result to those sources satisfying the filter criteria.

By default, results are ordered by decreasing source id. You can override this by setting sortByField to the name of a metadata field (optionally appended with " ASC" or " DESC" for this domain to order by that field's value.

The attributeFilter argument can be used to filter the results to only those where the requested entities (entitylist) appear in the context of a particular (set of) attribute(s). By using the negative attribute ID, you can select only those occurrences NOT appearing in the context of that attribute. For example, passing in $lb($$$IKATTNEGATION) will restrict the result to only those entities in a negative context and $lb(-$$$IKATTNEGATION) the ones in an affirmative context. Note that the use of this argument may have a significant performance impact.

If stemming is enabled for this domain through $$$IKPSTEMMING, sources containing any actual form of the entities in entityList will be returned. Use pActualFormOnly=1 to retrieve only those sources containing the actual forms in entitylist. This argument is ignored if stemming is not enabled.

GetByEntitiesFetch

ClassMethod GetByEntitiesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetByEntitiesExecute ]

GetByEntitiesClose

ClassMethod GetByEntitiesClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetByEntitiesExecute ]

GetByEntityIdsExecute

ClassMethod GetByEntityIdsExecute(ByRef qHandle As %Binary,  domainid As %Integer, entityidlist As %String(MAXLEN=32767), page As %Integer = 1, pagesize As %Integer = 10, filter As %String(MAXLEN=32767) = "", setop As %Integer = {$$$UNION}, attributeFilter As %String(MAXLEN=32767) = "", sortByField As %String(MAXLEN=32767) = "", pActualFormOnly As %Boolean = 0) As %Status [ Internal ]

Retrieves all sources containing the given entity ids.

See also GetByEntities for a description of the parameters.

GetByEntityIdsFetch

ClassMethod GetByEntityIdsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetByEntityIdsExecute ]

GetByEntityIdsClose

ClassMethod GetByEntityIdsClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetByEntityIdsExecute ]

GetByEquivalentIdsExecute

ClassMethod GetByEquivalentIdsExecute(ByRef qHandle As %Binary,  domainid As %Integer, entityidlist As %String(MAXLEN=32767), setid As %Integer, page As %Integer = 1, pagesize As %Integer = 10, filter As %String(MAXLEN=32767) = "") As %Status [ Internal ]

Deprecated

GetByEquivalentIdsFetch

ClassMethod GetByEquivalentIdsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetByEquivalentIdsExecute ]

GetByEquivalentIdsClose

ClassMethod GetByEquivalentIdsClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetByEquivalentIdsExecute ]

GetByEquivalentsExecute

ClassMethod GetByEquivalentsExecute(ByRef qHandle As %Binary,  domainid As %Integer, entitylist As %String(MAXLEN=32767), setid As %Integer, page As %Integer = 1, pagesize As %Integer = 10, filter As %String(MAXLEN=32767) = "") As %Status [ Internal ]

Deprecated

GetByEquivalentsFetch

ClassMethod GetByEquivalentsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetByEquivalentsExecute ]

GetByEquivalentsClose

ClassMethod GetByEquivalentsClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetByEquivalentsExecute ]

GetByPathIdsExecute

ClassMethod GetByPathIdsExecute(ByRef qHandle As %Binary,  domainid As %Integer, pathidlist As %String(MAXLEN=32767), page As %Integer = 1, pagesize As %Integer = 10, filter As %String(MAXLEN=32767) = "", sortByField As %String(MAXLEN=32767) = "") As %Status [ Internal ]

Retrieves all sources containing the given path ids.

See also GetByEntities for a description of the parameters.

GetByPathIdsFetch

ClassMethod GetByPathIdsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetByPathIdsExecute ]

GetByPathIdsClose

ClassMethod GetByPathIdsClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetByPathIdsExecute ]

GetCountByCrcIds

ClassMethod GetCountByCrcIds(domainid As %Integer, crcidlist As %String(MAXLEN=32767), filter As %String(MAXLEN=32767) = "", setop As %Integer = {$$$UNION}, Output scText As %String = "") As %Library.Integer [ SqlProc ]

Retrieves the number of sources containing the given CRC ids.

See also GetByEntities for a description of the parameters.

GetCountByCrcMask

ClassMethod GetCountByCrcMask(domainid As %Integer, head As %String(MAXLEN=32767) = {$$$WILDCARD}, relation As %String(MAXLEN=32767) = {$$$WILDCARD}, tail As %String(MAXLEN=32767) = {$$$WILDCARD}, filter As %String(MAXLEN=32767) = "", Output scText As %String = "", pActualFormOnly As %Boolean = 0) As %Library.Integer [ SqlProc ]

Retrieves the number of sources containing a CRC satisfying the given CRC Mask.

See also GetByEntities for a description of the parameters.

GetCountByCrcs

ClassMethod GetCountByCrcs(domainid As %Integer, crclist As %String(MAXLEN=32767), filter As %String(MAXLEN=32767) = "", setop As %Integer = {$$$UNION}, Output scText As %String = "") As %Library.Integer [ SqlProc ]

Retrieves the number of sources containing the given CRCs.

See also GetByEntities for a description of the parameters.

GetCountByDomain

ClassMethod GetCountByDomain(domainid As %Integer, filter As %String(MAXLEN=32767) = "", Output scText As %String = "") As %Library.Integer [ SqlProc ]

This method returns the total number of sources in the specified domain, optionally filtered through a %iKnow.Filters.Filter object passed in as filter.

GetCountByEntities

ClassMethod GetCountByEntities(domainid As %Integer, entitylist As %String(MAXLEN=32767), filter As %String(MAXLEN=32767) = "", setop As %Integer = {$$$UNION}, Output scText As %String = "", pActualFormOnly As %Boolean = 0) As %Library.Integer [ SqlProc ]

Retrieves the number of sources containing the given entities.

See also GetByEntities for a description of the parameters.

GetCountByEntityIds

ClassMethod GetCountByEntityIds(domainid As %Integer, entityidlist As %String(MAXLEN=32767), filter As %String(MAXLEN=32767) = "", setop As %Integer = {$$$UNION}, Output scText As %String = "", pActualFormOnly As %Boolean = 0) As %Library.Integer [ SqlProc ]

Retrieves the number of sources containing the given entity ids.

See also GetByEntities for a description of the parameters.

GetCountByPathIds

ClassMethod GetCountByPathIds(domainid As %Integer, pathidlist As %String(MAXLEN=32767), filter As %String(MAXLEN=32767) = "", Output scText As %String = "") As %Library.Integer [ SqlProc ]

Retrieves the number of sources containing the given path ids.

See also GetByEntities for a description of the parameters.

GetExternalId

ClassMethod GetExternalId(domainid As %Integer, srcId As %Integer, Output scText As %String = "") As %Library.String [ SqlProc ]

Retrieves the external ID for the source identified by srcId.

A negative srcId is considered to refer to a Virtual Source.

GetFullReference

ClassMethod GetFullReference(domainId As %Integer, srcId As %Integer, Output scText As %String = "") As %Library.String [ SqlProc ]

Retrieves the Full Reference for the source identified by srcId.

A negative srcId is considered to refer to a Virtual Source.

GetLanguagesExecute

ClassMethod GetLanguagesExecute(ByRef qHandle As %Binary,  domainid As %Integer, sourceid As %Integer) As %Status [ Internal ]

This method returns, for a given source, all languages the iKnow Automatic Language Identification algorithm has identified for the sentences it contains. For each language, it will list the sum of ALI confidence ratings when assigning the language to a sentence, plus the total number of sentences the language was assigned to. If ALI was disabled when indexing this source, confidence ratings will be set to 0.

A negative Source ID is interpreted as a Virtual Source.

GetLanguagesFetch

ClassMethod GetLanguagesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetLanguagesExecute ]

GetLanguagesClose

ClassMethod GetLanguagesClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetLanguagesExecute ]

GetSimilarExecute

ClassMethod GetSimilarExecute(ByRef qHandle As %Binary,  domainid As %Integer, sourceid As %Integer, page As %Integer = 1, pagesize As %Integer = 10, filter As %String(MAXLEN=32767) = "", algorithm As %String(MAXLEN=32767) = {$$$SIMSRCSIMPLE}, algorithmParams As %String(MAXLEN=32767) = "", skipListIds As %String(MAXLEN=32767) = "") As %Status [ Internal ]

Retrieves those sources that have similar content to the one specified through the sourceId parameter. Similarity is expressed by the (approximated) ratio between the length of the source and the overlap with the starting source, based on the chosen algorithm (according to the algorithm-specific algorithmParams).

Note: whenever possible, use a filter object to limit the search space for this query to perform adequately.

If the supplied Source ID is negative, it is treated as a Virtual Source. While this allows looking for sources similar to a Virtual Source, the query will not verify against other Virtual Sources and they will therefore not appear in the results of this query.

The skipListIds parameter allows a user to select one or more SkipLists of which the elements should be completely ignored in the similarity algorithm. Skiplisted elements will be ignored both for selecting similar candidates AND the calculation of their similarity score.

The following algorithms are currently available:

  • $$$SIMSRCSIMPLE: basic algorithm simply looking at entities (or CRCs or CCs) present in the reference source.
    Parameters:
    1. targetType As %String - either "ent", "crc" or "cc" (case insensitive, defaults to "ent"). Please note this implies the result columns will represent the corresponding targets, despite being named "nbOf_Ent_***"
  • $$$SIMSRCDOMENTS starts looking for similar sources based on dominant terms in the reference source.
    Parameters:
    1. strict As %Boolean - whether or not to select only sources for which at least one of the reference source's dominant concepts are also dominant in a similar source. (defaults to 1)

GetSimilarFetch

ClassMethod GetSimilarFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetSimilarExecute ]

GetSimilarClose

ClassMethod GetSimilarClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetSimilarExecute ]

GetSourceId

ClassMethod GetSourceId(domainid As %Integer, externalId As %String(MAXLEN=32767), Output scText As %String = "") As %Library.Integer [ SqlProc ]

Retrieves the source ID for the source identified by externalId.

GetSummaryExecute

ClassMethod GetSummaryExecute(ByRef qHandle As %Binary,  domainId As %Integer, srcId As %Integer, length As %Integer = 5, summaryConfig As %String(MAXLEN=32767) = "") As %Status [ Internal ]

This method returns the most relevant sentences of the requested source, in their original order. The number of sentences returned is controlled by the length parameter.

A negative Source ID is interpreted as a Virtual Source.

GetSummaryFetch

ClassMethod GetSummaryFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetSummaryExecute ]

GetSummaryClose

ClassMethod GetSummaryClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetSummaryExecute ]

GetSummaryDirect

ClassMethod GetSummaryDirect(domainId As %Integer, sourceId As %Integer, length As %Integer = 5, Output isTruncated As %Boolean = 0, Output scText As %String = "", separator As %String(MAXLEN=32767) = " ... ", summaryConfig As %String(MAXLEN=32767) = "") As %Library.String [ SqlProc ]

This is a utility wrapper method around GetSummary, returning the summary sentences as a single concatenated string.

The isTruncated output parameter indicates whether or not the returned string is complete or was truncated to avoid MAXSTRING errors. This can happen when either an individual sentence surpassed the maximum string length or when the concatenation of these sentences surpassed it.

GetSummaryForTextExecute

ClassMethod GetSummaryForTextExecute(ByRef qHandle As %Binary,  pDomainId As %Integer = 0, pText As %String(MAXLEN=32000), pLength As %Integer = 5, pSummaryConfig As %String(MAXLEN=32767) = "", pLanguage As %String(MAXLEN=32767) = "en", pUserDict As %String(MAXLEN=32767) = "") As %Status [ Internal ]

This method returns the most relevant sentences of the supplied text, in their original order. The number of sentences returned is controlled by the length parameter.

Note: the value of pDomainId is ignored since 2013.2

GetSummaryForTextFetch

ClassMethod GetSummaryForTextFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetSummaryForTextExecute ]

GetSummaryForTextClose

ClassMethod GetSummaryForTextClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetSummaryForTextExecute ]

GetTopLanguage

ClassMethod GetTopLanguage(domainid As %Integer, sourceid As %Integer, Output totalConfidence As %Numeric = "", Output numberOfSentences As %Integer = "", Output scText As %String = "") As %Library.String [ SqlProc ]

This method returns the language of a given source, calculated as the one with the highest total confidence rating for the individual sentences in the source. This total confidence, as well as the number of sentences to which this language was assigned is provided through output variables totalConfidence and numberOfSentences.

A totalConfidence of 0 indicates ALI was switched off when indexing this source.

A negative Source ID is interpreted as a Virtual Source.