Interface SearchParams

Parameters for searching DataObjects using Data.searchObjects.

These parameters configure the depth-first search performed by Data.searchObjects to locate DataObjects.

For detailed usage, refer to @xeokit/sdk/data.

interface SearchParams {
    excludeObjects?: number[];
    excludeRelated?: number[];
    excludeRelating?: number[];
    includeObjects?: number[];
    includeRelated?: number[];
    includeRelating?: number[];
    includeStart?: boolean;
    resultCallback?: (dataObject: DataObject) => boolean;
    resultObjectIds?: string[];
    resultObjects?: DataObject[];
    startObject?: DataObject;
    startObjectId?: string;
}

Properties

excludeObjects?: number[]

The types of DataObjects to exclude from the search results.

excludeRelated?: number[]

The types of Relationships to exclude from being followed in each DataObject.relating during the search.

excludeRelating?: number[]

The types of Relationships to exclude from being followed in each DataObject.related during the search.

includeObjects?: number[]

The types of DataObjects to exclusively include in the search results.

includeRelated?: number[]

The types of Relationships to exclusively follow in each DataObject.related during the search.

includeRelating?: number[]

The types of Relationships to exclusively follow in each DataObject.relating during the search.

includeStart?: boolean

Indicates whether to include the starting SearchParams.startObjectId or SearchParams.startObject in the search results.

The default is true.

resultCallback?: (dataObject: DataObject) => boolean

Collects the search results via a callback function that is executed for each matching DataObject.

This option is mutually exclusive with SearchParams.resultObjects and SearchParams.resultObjectIds.

resultObjectIds?: string[]

Collects the search results as a list of DataObject IDs.

This option is mutually exclusive with SearchParams.resultObjects and SearchParams.resultCallback.

resultObjects?: DataObject[]

Collects the search results as a list of DataObjects.

This option is mutually exclusive with SearchParams.resultObjectIds and SearchParams.resultCallback.

startObject?: DataObject

The DataObject to start the traversal from.

This overrides SearchParams.startObjectId.

startObjectId?: string

The ID of the DataObject to start the traversal from.

This is overridden by SearchParams.startObject.