Class Reference
IRIS for UNIX 2019.4
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [%iKnow] >  [Filters] >  [SentenceCountFilter]
Private  Storage   

class %iKnow.Filters.SentenceCountFilter extends %iKnow.Filters.Filter

Sample filter implementation restricting sources on their sentence count.

Filter parameters:

  1. domainId As %Integer
  2. minSentenceCount As %Integer - minimum sentence count (use -1 for no lower limit)
  3. maxSentenceCount As %Integer - maximum sentence count (use -1 for no upper limit)


Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 5


DomainId FilterId FilteredSourceCount IsCached
MaxSentenceCount MinSentenceCount Selectivity

%%OIDGet %AddToSaveSet %BindExport
%BuildObjectGraph %ClassIsLatestVersion %ClassName
%Close %ConstructClone %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%Extends %GetParameter %IncrementCount
%IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %ValidateObject BuildOccurrenceFilter
BuildTypedEntOccFilter BuildUniqueFilter CheckResultCache
CheckResultCacheSingle ClearCachedFilter ClearCachedFilters
CreateAsString CreateFromBitstring CreateGroupAsString
DomainIdSet FilteredSourceCountGet FromString
GetCRCOccurrenceFilter GetCRCUniqueFilter GetCcUniqueFilter
GetEntityOccurrenceFilter GetEntityUniqueFilter GetFilteredCcFrequency
GetFilteredCcSpread GetFilteredCrcFrequency GetFilteredCrcSpread
GetFilteredCrcUniqueCount GetFilteredEntityFrequency GetFilteredEntitySpread
GetFilteredEntityUniqueCount GetFilteredStemFrequency GetFilteredStemSpread
GetFirstFilteredSource GetLabel GetNextCRCOccurrenceFilterOffset
GetNextCRCUniqueFilterOffset GetNextCcUniqueFilterOffset GetNextEntityOccurrenceFilterOffset
GetNextEntityUniqueFilterOffset GetNextFilterOffset GetNextPathFilterOffset
GetNextSourceFilterOffset GetNextSrcId GetPathFilter
GetSecondaryFilter GetSourceFilter Initialize
Invalidate IsFiltered IsValid
MaxSentenceCountSet MergeBits MinSentenceCountSet
RestoreFilterFromId RestoreFilterFromString SaveFilteredFrequency
SaveFilteredSpread SelectivityGet StoreResultCache
StoreResultCacheSingle ToArray ToBitstring


• property MaxSentenceCount as %Integer;
• property MinSentenceCount as %Integer;


• private method %OnNew(DomainId As %Integer, MinSentenceCount As %Integer = -1, MaxSentenceCount As %Integer = -1) as %Status
This callback method is invoked by the %New method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

• private method BuildSourceFilter(maxOffset As %Integer) as %Status

This is the primary method that needs to be implemented by an actual %iKnow.Filters.Filter subclass to translate the abstract filter criteria the subclass addresses into a bitstring based on Source IDs. The subclass' implementation of this method should use SetSourceBits for this purpose, setting the requested bitstrings for each offset up to maxOffset.

• method MaxSentenceCountSet(max As %Integer) as %Status
This is a Set accessor method for the MaxSentenceCount property.
• method MinSentenceCountSet(min As %Integer) as %Status
This is a Set accessor method for the MinSentenceCount property.
• method ToString() as %String

Subclasses should implement this method to build a string representation of the filter instance. It should start with the filter class name, followed by a pipe (|) character and then a string representation that can be interpreted by its RestoreFilterFromStringInternal implementation.

Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.