SearchResult Class Methods

In this section, the SearchResult class methods are presented in alphabetical order.

Syntax

GetCategoryNames()

Description

Use this method to return the list of search categories to which this search result belongs as an array of string.

Parameters

None.

Returns

An array of string.

Syntax

GetContentLength()

Description

Use this method to return the content length for this search result as an integer. If the content length cannot be determined, this method returns -1.

The content length, signature, title, and other attributes are used to determine whether a search result is a duplicate.

Parameters

None.

Returns

An integer.

Syntax

GetCustomAttributes()

Description

Use this method to return a SearchFieldCollection representing the custom attributes for this search result. A SearchFieldCollection is a collection of SearchField objects.

Parameters

None.

Returns

A SearchFieldCollection object.

Syntax

GetImageUrl()

Description

Use the GetImageUrlmethod to return the image URL for this search result.

Parameters

None.

Returns

A String value.

Example

Local PT_SEARCH:SearchResult &cur;

...

If PTSF_QRY_CLIENT.PTSF_SHOW_IMAGE = "Y" Then
   &rs(&i).PTSF_SRCHRESULT.PTSF_DISPIMAGEURL.Visible = True;
   &rs(&i).PTSF_SRCHRESULT.HTMLAREA.Visible = True;
   &imageUrl = &cur.GetImageUrl();
   &imageUrlHtml = GetHTMLText(HTML.HTML_IMAGE, &imageUrl);
   &rs(&i).PTSF_SRCHRESULT.PTSF_DISPIMAGEURL.Value = &imageUrl;
   &rs(&i).PTSF_SRCHRESULT.HTMLAREA.Value = &imageUrlHtml;
Else
   &rs(&i).PTSF_SRCHRESULT.PTSF_DISPIMAGEURL.Visible = False;
   &rs(&i).PTSF_SRCHRESULT.HTMLAREA.Visible = False;
End-If;

Syntax

GetLanguage()

Description

Use this method to return a string representing the three-character PeopleSoft language code for this search result.

Parameters

None.

Returns

A string.

Syntax

GetLastModified()

Description

Use this method to return the last modified date and time for this search result.

Parameters

None.

Returns

A DateTime value.

Syntax

GetScore()

Description

Use this method to return the search engine-specific score for this search result as an integer.

Parameters

None.

Returns

An integer.

Syntax

GetSignature()

Description

Use this method to return the search engine-computed signature for this search result as an integer. If the signature cannot be determined, this method returns -1.

The signature, content length, title, and other attributes are used to determine whether a search result is a duplicate.

Parameters

None.

Returns

An integer.

Syntax

GetSummary()

Description

Use this method to return the summary for this search result as a string.

Parameters

None.

Returns

A string.

Syntax

GetTitle()

Description

Use this method to return the title for this search result as a string.

Parameters

None.

Returns

A string.

Syntax

GetUrlLink()

Description

Use this method to return the URL for this search result as a string.

Parameters

None.

Returns

A string.

Syntax

HasDuplicate()

Description

Use this method to return a Boolean value indicating whether this search result has duplicates.

Parameters

None.

Returns

A Boolean value: True if the search result has duplicates, False otherwise.

Syntax

IsDuplicate()

Description

Use this method to return a Boolean value indicating whether this search result is a duplicate. Exact duplicates and near duplicates are both marked as duplicates by the PeopleSoft Search Framework.

An exact duplicate is a document that satisfies all of the following conditions exactly:

  • Same signature

  • Same content length

  • Same title

A near duplicate (a similar document) is a document that satisfies any of the following conditions:

  • Same signature and documents are not empty.

  • Same (non-null) title and same 4K checksum.

  • Same (non-null) title and URLs differ by not more than one element (an element is a folder name and doesn't include the HTML/JSP page name of the HTTP GET parameters).

Parameters

None.

Returns

A Boolean value: True if this search result is a duplicate, False otherwise.