Categories property: SearchQuery class

Description

Use this property to set or return the list of search categories (search indexes) you want to search as an array of SearchCategory objects. If this property is defined, the Execute method will run the query on all the search categories specified in this property.

Important:

If this property is undefined, the query will be executed against all search categories in the search engine instance.

This property is read/write.

Example

The following example uses two search categories called cat1 and cat2.

import PT_SEARCH:SearchCategory;

Local array of PT_SEARCH:SearchCategory &cats;

&cats = CreateArray(create PT_SEARCH:SearchCategory("cat1"));
&cats.Push(create PT_SEARCH:SearchCategory("cat2"));

&searchQuery.Categories = &cats;

Related Topics