com.plumtree.server
Interface IPTSearchRequest

All Superinterfaces:
IPTUnknown

public interface IPTSearchRequest
extends IPTUnknown

IPTSearchRequest is the major interface used to run a search through the Plumtree portal; it contains factory methods for search queries, settings that govern all aspects of the search, and methods to actually execute the query.

The standard usage pattern for IPTSearchRequest is:

Version:
$Revision$
Author:
CraigS
See Also:
PT_SEARCH_SETTING, IPTSearchQuery, IPTSearchResponse

Method Summary
 IPTSearchQuery CreateAdvancedQuery(IPTFilter filter)
          Factory method that returns an advanced (filter-based) query, using the provided filter.
 IPTSearchQuery CreateBasicQuery(java.lang.String searchString, java.lang.String fields)
          Factory method that returns a basic (simple text) query for the indicated search string and fields.
 IPTSearchResponse FollowupSearch(java.lang.Object queryArray)
          Follow up a previous search by ANDing the provided array of queries together and executing them.
 int GetSettingsAsInt(int settingID)
          Retrieve value of an integer-valued search setting.
 java.lang.Object GetSettingsAsObject(int settingID)
          Retrieve value of any search setting.
 java.lang.Object[] GetSettingsAsObject1DArray(int settingID)
          Retrieve value of an array-valued search setting.
 java.lang.String GetSettingsAsString(int settingID)
          Retrieve value of an String-valued search setting.
 IPTSearchResponse Search(IPTSearchQuery pQuery)
          Executes a search, using the provided query and any settings that have previously been set.
 void SetSettings(int settingId, int settingValue)
          Set an integer-valued search setting.
 void SetSettings(int settingId, java.lang.Object settingValue)
          Set a search setting (of any type).
 void SetSettings(int settingId, java.lang.Object[] settingValue)
          Set an array-valued (usually Integer[]) search setting.
 void SetSettings(int settingId, java.lang.String settingValue)
          Set a String-valued search setting.
 
Methods inherited from interface com.plumtree.server.IPTUnknown
GetInterfaces
 

Method Detail

GetSettingsAsInt

int GetSettingsAsInt(int settingID)
Retrieve value of an integer-valued search setting. See the PT_SEARCH_SETTING enumeration for information on settings and their types.

Parameters:
settingID - setting id whose value is desired; one of the PT_SEARCH_SETTING values
Returns:
the setting value
See Also:
PT_SEARCH_SETTING

GetSettingsAsString

java.lang.String GetSettingsAsString(int settingID)
Retrieve value of an String-valued search setting. See the PT_SEARCH_SETTING enumeration for information on settings and their types.

Parameters:
settingID - setting id whose value is desired; one of the PT_SEARCH_SETTING values
Returns:
the setting value
See Also:
PT_SEARCH_SETTING

GetSettingsAsObject

java.lang.Object GetSettingsAsObject(int settingID)
Retrieve value of any search setting. See the PT_SEARCH_SETTING enumeration for information on settings and their types.

Parameters:
settingID - setting id whose value is desired; one of the PT_SEARCH_SETTING values
Returns:
the setting value
See Also:
PT_SEARCH_SETTING

GetSettingsAsObject1DArray

java.lang.Object[] GetSettingsAsObject1DArray(int settingID)
Retrieve value of an array-valued search setting. See the PT_SEARCH_SETTING enumeration for information on settings and their types.

Parameters:
settingID - setting id whose value is desired; one of the PT_SEARCH_SETTING values
Returns:
the setting value
See Also:
PT_SEARCH_SETTING

SetSettings

void SetSettings(int settingId,
                 int settingValue)
Set an integer-valued search setting. Throws an exception if the value is of the wrong type or is otherwise invalid. See the PT_SEARCH_SETTING enumeration for information on settings and their types.

Parameters:
settingId - setting id being set; one of the PT_SEARCH_SETTING values
settingValue - value to set
See Also:
PT_SEARCH_SETTING

SetSettings

void SetSettings(int settingId,
                 java.lang.String settingValue)
Set a String-valued search setting. Throws an exception if the value is of the wrong type or is otherwise invalid. See the PT_SEARCH_SETTING enumeration for information on settings and their types.

Parameters:
settingId - setting id being set; one of the PT_SEARCH_SETTING values
settingValue - value to set
See Also:
PT_SEARCH_SETTING

SetSettings

void SetSettings(int settingId,
                 java.lang.Object settingValue)
Set a search setting (of any type). Throws an exception if the value is of the wrong type or is otherwise invalid. See the PT_SEARCH_SETTING enumeration for information on settings and their types.

Parameters:
settingId - setting id being set; one of the PT_SEARCH_SETTING values
settingValue - value to set
See Also:
PT_SEARCH_SETTING

SetSettings

void SetSettings(int settingId,
                 java.lang.Object[] settingValue)
Set an array-valued (usually Integer[]) search setting. Throws an exception if the value is of the wrong type or is otherwise invalid. See the PT_SEARCH_SETTING enumeration for information on settings and their types.

Parameters:
settingId - setting id being set; one of the PT_SEARCH_SETTING values
settingValue - value to set
See Also:
PT_SEARCH_SETTING

Search

IPTSearchResponse Search(IPTSearchQuery pQuery)
Executes a search, using the provided query and any settings that have previously been set. The query must have been manufactured by this same IPTSearchRequest object, via CreateBasicQuery or CreateAdvancedQuery.

Parameters:
query - Query to execute
Returns:
IPTSearchResponse containing search results.

FollowupSearch

IPTSearchResponse FollowupSearch(java.lang.Object queryArray)
Follow up a previous search by ANDing the provided array of queries together and executing them. One query in the array, usually the first, should be the query used in a previous call to Search(). The others are either new queries manufactured by calls to one of the Create() methods (this implements a "search-within-results" feature), or a query returned by IPTSearchResponse.GetQueryForGroup() (this implements a "category drilldown" feature).

Parameters:
queryArray - Array, declared as Object[], where each element is an IPTSearchQuery (these exact types are required by the .NET wrappers).
Returns:
IPTSearchResponse containing the results of the conjunction (AND) of queries

CreateBasicQuery

IPTSearchQuery CreateBasicQuery(java.lang.String searchString,
                                java.lang.String fields)
Factory method that returns a basic (simple text) query for the indicated search string and fields.

Parameters:
searchString - String to search for (non-null, non-empty)
fields - Fields to search. Usually null, in which case a default set of fields is searched. Alternatively, may be a string of the form "PTj[x],PTk[y]", where j and k are integer property IDs to be searched, and x and y are corresponding floating-point weights.
Returns:
query that may be used in a call to Search()

CreateAdvancedQuery

IPTSearchQuery CreateAdvancedQuery(IPTFilter filter)
Factory method that returns an advanced (filter-based) query, using the provided filter.

Parameters:
filter - Filter on which to base the query (non-null and must contain a search string or at least one IPTPropertyFilterStatement)
Returns:
query that may be used in a call to Search()