com.plumtree.server.search.admin
Interface IPTSAdmin


public interface IPTSAdmin

Contains helper methods used by search-related administrative tasks in the Plumtree Corporate Portal.


Method Summary
 IPTSearchBestBetMaintenance createBestBetMaintenance()
          Factory method that creates an IPTSearchBestBetMaintenance object.
 int getCardCount(boolean bFulltextOnly)
          Runs a special-purpose search query that returns the number of cards (documents) indexed.
 java.lang.String getLastSearchTransactionIDAsString()
          Give back a String representaion of a last search index request made within this application.
 int[] getSearchableObjectIDsInRange(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.
 com.plumtree.openfoundation.util.IXPPropertyBag retrieveClusterStatus()
          Returns current status of the search cluster, including transation and partition information
 com.plumtree.openfoundation.util.IXPPropertyBag retrieveStatus()
          Returns current status of the search server(s), including connection information and number of indexed documents.
 java.lang.String waitForDocsToBecomeSearchable(int timeout)
          Wait until all the index requests initiated by the client have been processed by the search server.
 

Method Detail

retrieveStatus

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.

retrieveClusterStatus

com.plumtree.openfoundation.util.IXPPropertyBag retrieveClusterStatus()
Returns current status of the search cluster, including transation and partition information

Returns:
Property bag containing the status

waitForDocsToBecomeSearchable

java.lang.String waitForDocsToBecomeSearchable(int timeout)
Wait until all the index requests initiated by the client have been processed by the search server. A client should invoke this method only if it must ensure that everything that it submitted over a period of time is searchable. This is not the way to simulate "synchronous" indexing. Use CommitAll(int timeout) instead. Us this method sparignly since it can potentialy create many search cluster status requests.

Parameters:
timeout - - amout of time to wait for everything to be processed
Returns:
current known fully processed(i.e searchable) transaction id
Throws:
PTException - if the timeout occurs

getLastSearchTransactionIDAsString

java.lang.String getLastSearchTransactionIDAsString()
Give back a String representaion of a last search index request made within this application. This should be used for information/logging purposes only. No functionality should depend on a specific representation of the TID.

Returns:
Returns the lastSearchIndexRequestID.

getCardCount

int getCardCount(boolean bFulltextOnly)
                 throws PTSInvalidSearchException,
                        PTSSearchServerConnectionException
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
Throws:
PTSSearchServerConnectionException - if the Plumtree Search Service is unavailable
PTSInvalidSearchException - in case of an internal error

getSearchableObjectIDsInRange

int[] getSearchableObjectIDsInRange(int lClassID,
                                    int nLowerBound,
                                    boolean bLowerBoundExclusive,
                                    int nHigherBound,
                                    boolean bHigherBoundExclusive,
                                    boolean bOnlyApplyLowerBound)
                                    throws PTSInvalidSearchException,
                                           PTSSearchServerConnectionException,
                                           PTSSyntaxException
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:
int[] containing object IDs in range, not necessarily sorted.
Throws:
PTSSearchServerConnectionException - if the Plumtree Search Service is unavailable
PTSInvalidSearchException - in case of an internal error
PTSSyntaxException - in case of an internal error

createBestBetMaintenance

IPTSearchBestBetMaintenance createBestBetMaintenance()
Factory method that creates an IPTSearchBestBetMaintenance object.

Returns:
Best bet maintenance object.
See Also:
IPTSearchBestBetMaintenance