|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPTSearchResponse
IPTSearchResponse contains the results of a single search; it is returned by IPTSearchRequest.Search() and FollowupSearch(). It contains methods to retrieve information about items matching the search, categories (groups) identified, and spelling corrections made in the course of executing the search.
Method Summary | |
---|---|
void |
Clear()
Clears this object and releases memory associated with it, which may be substantial. |
java.lang.String |
GetCorrectedToken(int nMisspellingIndex,
int nCorrectionIndex)
Returns a single spelling correction for a single misspelled token. |
int |
GetCorrectionFrequency(int nMisspellingIndex,
int nCorrectionIndex)
Returns the number of search results in which the selected correction appears. |
double |
GetFieldsAsDouble(int nRank,
int nPropertyID)
Returns the value of a single field (property) in a single search result. |
int |
GetFieldsAsInt(int nRank,
int nPropertyID)
Returns the value of a single field (property) in a single search result. |
java.lang.Object |
GetFieldsAsObject(int nRank,
int nPropertyID)
Returns the value of a single field (property) in a single search result. |
java.lang.String |
GetFieldsAsString(int nRank,
int nPropertyID)
Returns the value of a single field (property) in a single search result. |
com.plumtree.openfoundation.util.XPDateTime |
GetFieldsAsXPDateTime(int nRank,
int nPropertyID)
Returns the value of a single field (property) in a single search result. |
java.lang.String |
GetGroupLabel(int nGroupIndex)
Returns a label for a single group. |
boolean |
GetIsBestBet(int nRank)
Returns true if the result appears in the result set (or if its rank was affected) because of a Best Bet. |
double |
GetKWICFieldsAsDouble(int nRank,
int nPropertyID)
Behaves identically to GetFieldsAsDouble; call that method instead. |
int |
GetKWICFieldsAsInt(int nRank,
int nPropertyID)
Behaves identically to GetFieldsAsInt; call that method instead. |
java.lang.Object |
GetKWICFieldsAsObject(int nRank,
int nPropertyID)
Call GetFieldsAsObject() or GetKWICFieldsAsString() instead, depending on what you want. |
java.lang.String |
GetKWICFieldsAsString(int nRank,
int nPropertyID)
Returns keyword-in-context ("KWIC") information for the given result and property. |
com.plumtree.openfoundation.util.XPDateTime |
GetKWICFieldsAsXPDateTime(int nRank,
int nPropertyID)
Behaves identically to GetFieldsAsXPDateTime; call that method instead. |
java.lang.String |
GetMisspelledToken(int nIndex)
Returns one misspelled token. |
int |
GetNumCorrections(int nIndex)
Returns the number of spelling corrections found for the given misspelled token. |
int |
GetNumGroups()
Returns the number of categories into which the results were divided. |
int |
GetNumMisspelledTokens()
Returns the number of tokens (words) in the user's query that were spell corrected. |
IPTSearchQuery |
GetQueryForAllOthers()
Like GetQueryForGroup(), returns an IPTSearchQuery that may be used to drill down into the "all others" set of results that did not fall in any coherent group. |
IPTSearchQuery |
GetQueryForGroup(int nGroupIndex)
Returns an IPTSearchQuery that may be passed to IPTSearchRequest.FollowupSearch() (along with the original query/queries used to generate this IPTSearchResponse) to drill down into the indicated group. |
int |
GetRank(int nGroup,
int nRowWithinGroup)
Maps from the result ranking within a group to the overall (ungrouped) result ranking. |
int |
GetRankForUncategorizedDoc(int rankWithinAllOthers)
Like GetRank(), maps from the rank in the uncategorized "all others" set to the overall result ranking. |
java.lang.String |
GetResultAbsType(int nRank)
Abstractified, cross-application type of the result: "DOCUMENT", "CONTAINER", or "OTHER". |
java.lang.String |
GetResultACL(int nRank)
Returns the ACL of the result (for portal objects only), or the list of Collab roles that have access to the result (for Collab objects only). |
java.lang.String |
GetResultApp(int nRank)
Returns the application that indexed this result: one of PTPORTAL (portal items), PTCONTENT (Content Server), PTCONTENTTEMPLATE (Branding Engine), or PTCOLLAB (Collaboration Server). |
java.lang.String |
GetResultFolderACL(int nRank)
Returns the ACL of the result's folder (for portal objects only). |
java.lang.String |
GetResultInternalField(int nRank,
int nInternalFieldID)
Returns the value of one of several "internal fields" that don't correspond to properties and that aren't important enough to merit their own method. |
java.lang.String |
GetResultPath(int nRank)
Returns the full path to the object, in text form. |
int |
GetResultSize(int nRank)
Returns the size of the result in bytes, or a negative value if unknown. |
int |
GetResultsReturned()
Get the number of results returned. |
java.lang.String |
GetResultSubType(int nRank)
Returns the application-specific type of the result. |
int |
GetReturnedResultsInGroup(int nGroupIndex)
Returns the number of results in the group that are available for display. |
int |
GetReturnedResultsNotInAnyGroup()
Returns the number of displayable results that did not fall in any group. |
int |
GetSkipped()
Returns the number of results skipped before beginning to return results. |
int |
GetTotalMatches()
Get the total number of matches for the query. |
java.lang.String |
GetTotalResultsInGroup(int nGroupIndex)
Returns the total number of results in the indicated group, or an estimate in some cases. |
java.lang.Object |
GetTotalResultsNotInAnyGroup()
Returns an estimate the number of results in the overall result set (not just those displayed) that did not fall into any group. |
int |
GetWarning()
Returns a code indicating whether any warnings were issued in the course of running the search. |
Methods inherited from interface com.plumtree.server.IPTUnknown |
---|
GetInterfaces |
Method Detail |
---|
int GetResultsReturned()
int GetSkipped()
int GetTotalMatches()
int GetWarning()
int GetNumMisspelledTokens()
java.lang.String GetMisspelledToken(int nIndex)
nIndex
- Index of desired token, from 0 to (GetNumMisspelledTokens()-1).
int GetNumCorrections(int nIndex)
nIndex
- Index of token, from 0 to (GetNumMisspelledTokens()-1).
java.lang.String GetCorrectedToken(int nMisspellingIndex, int nCorrectionIndex)
nMisspellingIndex
- Index of original token, from 0 to (GetNumMisspelledTokens()-1).nCorrectionIndex
- Index of desired correction, from 0 to (GetNumCorrections(nMisspellingIndex)-1).
int GetCorrectionFrequency(int nMisspellingIndex, int nCorrectionIndex)
nMisspellingIndex
- Index of original token, from 0 to (GetNumMisspelledTokens()-1).nCorrectionIndex
- Index of desired correction, from 0 to (GetNumCorrections(nMisspellingIndex)-1).
int GetNumGroups()
java.lang.String GetGroupLabel(int nGroupIndex)
nGroupIndex
- Desired group, from 0 to (GetNumGroups()-1).
java.lang.String GetTotalResultsInGroup(int nGroupIndex)
nGroupIndex
- Desired group, from 0 to (GetNumGroups()-1).
int GetReturnedResultsInGroup(int nGroupIndex)
nGroupIndex
- Desired group, from 0 to (GetNumGroups()-1).
IPTSearchQuery GetQueryForGroup(int nGroupIndex)
nGroupIndex
- Desired group, from 0 to (GetNumGroups()-1).
int GetRank(int nGroup, int nRowWithinGroup)
nGroupIndex
- Desired group, from 0 to (GetNumGroups()-1).nRowWithinGroup
- Result within the group, from 0 to (GetReturnedResultsInGroup(nGroupIndex)-1).
int GetReturnedResultsNotInAnyGroup()
IPTSearchQuery GetQueryForAllOthers()
int GetRankForUncategorizedDoc(int rankWithinAllOthers)
rankWithinAllOthers
- rank in uncategorized set, from 0 to (GetReturnedResultsNotInAnyGroup()-1).
java.lang.Object GetTotalResultsNotInAnyGroup()
int GetFieldsAsInt(int nRank, int nPropertyID)
This is the method to call if you want the Object ID of a search result - pass PT_INTRINSICS.PT_PROPERTY_OBJECTID for nPropertyID.
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).nPropertyID
- ID of the property desired, or one of the special-case pseudoproperties
given by PT_INTRINSICS in the ranges [1,8] and [51,58]. Must be an integer-valued property.
java.lang.String GetFieldsAsString(int nRank, int nPropertyID)
This is the method to call if you want the name of a search result - pass PT_INTRINSICS.PT_PROPERTY_OBJECTNAME for nPropertyID.
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).nPropertyID
- ID of the property desired, or one of the special-case pseudoproperties
given by PT_INTRINSICS in the ranges [1,8] and [51,58]. Must be a text property.
com.plumtree.openfoundation.util.XPDateTime GetFieldsAsXPDateTime(int nRank, int nPropertyID)
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).nPropertyID
- ID of the property desired, or one of the special-case pseudoproperties
given by PT_INTRINSICS in the ranges [1,8] and [51,58]. Must be a date-valued property.
Note: PT_INTRINSICS.PT_PROPERTY_OBJECTCREATED and PT_INTRINSICS.PT_PROPERTY_OBJECTLASTMODIFIED have special-case behavior; despite being dates they are returned as type Double. Instead of this method call GetFieldsAsDouble(), then SearchResultModel.ConvertSearchDateTimeToXPDateTime() to convert to date.
double GetFieldsAsDouble(int nRank, int nPropertyID)
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).nPropertyID
- ID of the property desired, or one of the special-case pseudoproperties
given by PT_INTRINSICS in the ranges [1,8] and [51,58]. Must be a double-valued property
(or the OBJECTCREATED or OBJECTLASTMODIFIED intrinsics, see the comment for GetFieldsAsXPDateTime).
java.lang.Object GetFieldsAsObject(int nRank, int nPropertyID)
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).nPropertyID
- ID of the property desired, or one of the special-case pseudoproperties
given by PT_INTRINSICS in the ranges [1,8] and [51,58].
int GetKWICFieldsAsInt(int nRank, int nPropertyID)
java.lang.String GetKWICFieldsAsString(int nRank, int nPropertyID)
This method is usually called with PT_INTRINSICS.PT_PROPERTY_OBJECTSUMMARY, in which case it has special-case behavior to find the best KWIC information from the OBJECTSUMMARY and full-text content fields. This is how the portal generates the summaries that appear below the result title. However, you may call it with any other property used to constrain the search, and it will return KWIC info for that property if it exists.
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).nPropertyID
- PT_INTRINSICS.PT_PROPERTY_OBJECTSUMMARY or another text property ID
com.plumtree.openfoundation.util.XPDateTime GetKWICFieldsAsXPDateTime(int nRank, int nPropertyID)
double GetKWICFieldsAsDouble(int nRank, int nPropertyID)
java.lang.Object GetKWICFieldsAsObject(int nRank, int nPropertyID)
java.lang.String GetResultPath(int nRank)
Portal documents may live in more than one folder. If so, this method returns one folder path chosen more or less at random, and there is no guarantee that the user has rights to this particular folder (although s/he must have rights to one of the doc's folders). To check this, call GetResultInternalField() and request PT_SEARCH_INTERNAL_FIELD.PT_SEARCH_IF_PARENTIDS; if there is more than one parent (i.e. a space appears in this string) you should not display the path.
Also, the path may not be localized to the user's current locale.
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).
java.lang.String GetResultApp(int nRank)
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).
java.lang.String GetResultSubType(int nRank)
For portal objects, possible values are currently: PTUSER, PTGROUP, PTAUTHSOURCE, PTPROFILESOURCE, PTFOLDER, PTCARD, PTADMINFOLDER, PTFILTER, PTSAVEDSEARCH, PTDATASOURCE, PTCARDPROPERTY, PTDOCUMENTTYPE, PTCRAWLER, PTGADGET, PTINVITATION, PTFEDPORTAL, PTGADGETSERVER, PTCOMMTEMPLATE, PTGADGETBUNDLE, PTPAGETEMPLATE, PTWEBSERVICE, PTEXTOPERATION, PTGADGETTEMPLATE, PTJOB, PTCOMMUNITY.
For Collaboration Server items, returns PTCOLLAB.
For Content Server items, returns PTCONTENT.
For Branding Engine items, returns PTCOMMUNITY, so these items appear in the "community" category.
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).
java.lang.String GetResultAbsType(int nRank)
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).
int GetResultSize(int nRank)
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).
boolean GetIsBestBet(int nRank)
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).
java.lang.String GetResultACL(int nRank)
For portal objects, both the ACL and folder ACL must match the user's access rights. Portal ACLs are returned as a space-separated string of group IDs and user IDs, where the user IDs are prefixed with the character 'u'.
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).
java.lang.String GetResultFolderACL(int nRank)
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).
java.lang.String GetResultInternalField(int nRank, int nInternalFieldID)
nRank
- Ungrouped result rank, in the range 0 to (GetReturnedResults()-1).nInternalFieldID
- Internal field ID, one of the members of PT_SEARCH_INTERNAL_FIELD.
void Clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |