SearchResultCollection Class Methods
In this section, the SearchResultCollection class methods are presented in alphabetical order.
Syntax
First()
Description
Use this method to return the first SearchResult object in the SearchResult collection. If the SearchResult collection is empty, it returns Null.
Parameters
None.
Returns
A SearchResult object if successful, Null otherwise.
Syntax
GetDocumentCount()
Description
Use this method to return the actual number of SearchResult objects (documents) in the SearchResult collection.
Note: This is an abstract method.
Parameters
None.
Returns
An integer.
Syntax
GetDuplicatesMarked()
Description
Use this method to return a Boolean value indicating whether duplicate items in the collection are marked as duplicates—that is, whether the search query was executed with MarkDuplicates set to true.
Note: This is an abstract method.
Parameters
None.
Returns
A Boolean value: True if duplicates were marked, False otherwise.
Syntax
GetDuplicatesRemoved()
Description
Use this method to return a Boolean value indicating whether duplicate items in the collection were removed—that is, whether the search query was executed with RemoveDuplicates set to true.
Note: This is an abstract method.
Parameters
None.
Returns
A Boolean value: True if duplicates were removed, False otherwise.
Syntax
GetEstimatedHitCount()
Description
Use this method to return the estimated hit count for the search query as an integer. The estimated hit count can be used as a device for fetching search results on demand rather than retrieving all of the search results initially.
Note: This is an abstract method.
Parameters
None.
Returns
An integer.
Syntax
GetFacetNodes()
Description
Use this method to return an array of facet nodes available for this search result collection.
Parameters
None.
Returns
An array of FacetNode objects if successful, Null otherwise.
Syntax
GetQueryObject()
Description
Use this method to return the SearchQuery object that was used for the search.
Parameters
None.
Returns
A SearchQuery object.
Syntax
GetQueryText()
Description
Use this method to return the search text that was used for the search query as a string.
Note: This is an abstract method.
Parameters
None.
Returns
A string.
Syntax
GetStartIndex()
Description
Use this method to return the value of the &start parameter that was used to execute this search query.
Note: This is an abstract method.
Parameters
None.
Returns
An integer.
Syntax
Item(index)
Description
Use this method to return the SearchResult object at the position in the SearchResult collection specified by the index parameter.
Parameters
Field or Control |
Definition |
---|---|
index |
Specifies the position of the SearchResult object in the SearchResult collection as an integer. |
Returns
A SearchResult object if successful, Null otherwise.
Syntax
Next()
Description
Use this method to return the next SearchResult object in the SearchResult collection. This method can only be invoked after a successful invocation of the First, Item, or Next methods.
Parameters
None.
Returns
A SearchResult object if successful, Null otherwise.