Previous Topic: Set Search Parameters When Creating the Search Object

Next Topic: Set the Search Filter

Set Search Parameters After Creating the Search Object

After a search object is created, you can use the set... methods in the SmDmsSearch class to:

By using the set... methods, you can set or reset any of the parameters shown in the following table:

Parameter

Default

Set Method

Definition

classId

Unknown (not set yet)

setClassId()

Class identifier.

filter

" "

setFilter()

Search filter, or the string you want to find.

Can also be set when the search object is created.

maxItems

50

setMaxItems()

Maximum number of result set items to display at a time.

Can also be set when the search object is created.

nMaxResults

-1

setMaxResults()

Maximum number of items for the result set.

For example, if nMaxResults is 500, but 750 items match the search criteria, only the first 500 matches will be returned from the search.

nextItem

-1

setNextItem()

The item to start with on the next search forward—for example:

nextItem += maxItems

previousItem

-1

setPreviousItem()

The item to start with on the next search backward—for example:

previousItem-=maxItems

propertyNames

null

setPropertyNames()

Properties to return from the search.

Can also be set when the search object is created.

root

" "

setRoot()

Directory entry where the search should start.

Can also be set when the search object is created.

Valid for LDAP searches only.

scope

None

setScope()

Levels searched.

For LDAP searches only.

timeout

-1

setTimeout()

Maximum duration of the search, in seconds.