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:

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.
 IPTSearchBestBetMaintenance CreateBestBetMaintenance()
          Factory method that creates an IPTSearchBestBetMaintenance object.
 IPTSearchResponse FollowupSearch(java.lang.Object queryArray)
          Follow up a previous search by ANDing the provided array of queries together and executing them.
 int GetCardCount(boolean bFulltextOnly)
          Runs a special-purpose search query that returns the number of cards (documents) indexed.
 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 OptimizedRangeQuery(int lClassID, int nLowerBound, boolean bLowerBoundExclusive, int nHigherBound, boolean bHigherBoundExclusive, boolean bOnlyApplyLowerBound)
          Runs a special-purpose query used by Search Repair to check for discrepancies between the database and search index.
 void RefreshBestBetsCache()
          Causes the shared cache of Best Bets to be reloaded from the database.
 com.plumtree.openfoundation.util.IXPPropertyBag RetrieveStatus()
          Returns current status of the search server(s), including connection information and number of indexed documents.
 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

RetrieveStatus

public com.plumtree.openfoundation.util.IXPPropertyBag RetrieveStatus()
Returns current status of the search server(s), including connection information and number of indexed documents.
Returns:
Property bag containing the status; may contain sub-bags for the query, failover, and index servers.

GetSettingsAsInt

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

OptimizedRangeQuery

public IPTSearchResponse OptimizedRangeQuery(int lClassID,
                                             int nLowerBound,
                                             boolean bLowerBoundExclusive,
                                             int nHigherBound,
                                             boolean bHigherBoundExclusive,
                                             boolean bOnlyApplyLowerBound)
Runs a special-purpose query used by Search Repair to check for discrepancies between the database and search index. Returns all indexed objects of a given class ID and within a specified range of object IDs.
Parameters:
lClassID - object type (PT_CLASSID) to constrain the query
nLowerBound - lower limit of the object ID range
bLowerBoundExclusive - whether the lower bound is included in the range
nHigherBound - upper limit of the object ID range
bHigherBoundExclusive - whether the upper bound is included in the range
bOnlyApplyLowerBound - if true, ignore nHigherBound
Returns:
IPTSearchResponse containing search results

GetCardCount

public int GetCardCount(boolean bFulltextOnly)
Runs a special-purpose search query that returns the number of cards (documents) indexed.
Parameters:
bFulltextOnly - if true, count only cards with their full text indexed
Returns:
the number of cards

CreateBasicQuery

public 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

public 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()

CreateBestBetMaintenance

public IPTSearchBestBetMaintenance CreateBestBetMaintenance()
Factory method that creates an IPTSearchBestBetMaintenance object. Not very closely tied to the rest of this interface.
Returns:
Best bet maintenance object.
See Also:
IPTSearchBestBetMaintenance

RefreshBestBetsCache

public void RefreshBestBetsCache()
Causes the shared cache of Best Bets to be reloaded from the database. Used by PTSearchBestBetMaintenance.


Copyright © 2003 Plumtree Software Inc. All Rights Reserved.