com.plumtree.server.search
Interface IPTSearchFactory


public interface IPTSearchFactory

Defines factory methods for all other objects in the com.plumtree.server.search package.


Method Summary
 IPTSCollabCollection CollabCollection()
          Returns an IPTSCollabCollection that contains IPTSQuery and IPTSField instances related to Plumtree Collaboration Server.
 IPTSContentCollection ContentCollection()
          Returns an IPTSContentCollection that contains IPTSQuery and IPTSField instances related to Plumtree Content Server.
 IPTSAdmin createAdmin()
          Returns an IPTSAdmin instance that may be used for various search administration tasks.
 IPTSQuery createBestBetTargetQuery(java.lang.String trigger)
          Construct an IPTSQuery that returns the best bet targets for a specified trigger string.
 IPTSBooleanQuery createBooleanQuery(int booleanOperator)
          Construct an IPTSBooleanQuery that ANDs or ORs a number of child queries.
 IPTSQuery createComparisonQuery(IPTSField booleanField, boolean comparisonValue)
          Construct an IPTSQuery for a comparison involving boolean fields.
 IPTSQuery createComparisonQuery(IPTSField numericField, int comparisonOperator, float comparisonValue)
          Construct an IPTSQuery for a comparison involving integer, floating-point, or date fields.
 IPTSQuery createComparisonQuery(IPTSField numericField, int comparisonOperator, int comparisonValue)
          Construct an IPTSQuery for a comparison involving integer, floating-point, or date fields.
 IPTSQuery createComparisonQuery(IPTSField numericField, int comparisonOperator, long comparisonValue)
          Construct an IPTSQuery for a comparison involving integer, floating-point, or date fields.
 IPTSQuery createComparisonQuery(IPTSField dateField, int comparisonOperator, com.plumtree.openfoundation.util.XPDateTime comparisonValue)
          Construct an IPTSQuery for a comparison involving a date/time field and a non-relative operator.
 IPTIndexer createIndexer()
          Returns an IPTIndexer which may be used to submit index requests.
 IPTSModifiableQuery createPropertyFilterQuery(IPTFilter filter)
          Construct an IPTSQuery that wraps the provided IPTFilter.
 IPTSQueryRequest createQueryRequest()
          Returns an IPTSQueryRequest which may be used to submit search queries.
 IPTSModifiableQuery createTextQuery(IPTSField field, java.lang.String queryString)
          Construct a text (string) query against the indicated field.
 IPTSModifiableQuery createTextQuery(IPTSField field, java.lang.String queryString, PTSTextQueryParseMode parseMode)
          Construct a text (string) query against the indicated field, using the indicated parse mode.
 IPTSWeightedFieldList createWeightedFieldList()
          Returns an empty IPTSWeightedFieldList.
 IPTSPortalCollection PortalCollection()
          Returns an IPTSPortalCollection that contains IPTSQuery and IPTSField instances related to the Plumtree Corporate Portal.
 void setNumberSearchNodes(int numNodes)
          Set the number of verified available search server nodes
 

Method Detail

setNumberSearchNodes

void setNumberSearchNodes(int numNodes)
Set the number of verified available search server nodes

Parameters:
numNodes -

createQueryRequest

IPTSQueryRequest createQueryRequest()
Returns an IPTSQueryRequest which may be used to submit search queries.


createIndexer

IPTIndexer createIndexer()
Returns an IPTIndexer which may be used to submit index requests.


createTextQuery

IPTSModifiableQuery createTextQuery(IPTSField field,
                                    java.lang.String queryString)
                                    throws PTSEmptyQueryException
Construct a text (string) query against the indicated field. queryString will be parsed according to the rules set by the PTSTextQueryParseMode.SEARCHBOX parse mode, in the language of the query's parent IPTSQueryRequest.

Parameters:
field - the field to search. Must be of type PTSFieldType.STRING. Use the field returned by IPTSSearchableCollection.TextQueryDefault to search the default set of fields.
queryString - the string to search for.
Throws:
PTSEmptyQueryException - if queryString is empty

createTextQuery

IPTSModifiableQuery createTextQuery(IPTSField field,
                                    java.lang.String queryString,
                                    PTSTextQueryParseMode parseMode)
                                    throws PTSEmptyQueryException
Construct a text (string) query against the indicated field, using the indicated parse mode. queryString will be parsed according to the rules set by the parse mode (see class PTSTextQueryParseMode), in the language of the query's parent IPTSQueryRequest.

Parameters:
field - the field to search. Must be of type PTSFieldType.STRING. Use the field returned by IPTSSearchableCollection.TextQueryDefault to search the default set of fields.
queryString - the string to search for.
parseMode - mode in which to interpret queryString. See class PTSTextQueryParseMode.
Throws:
PTSEmptyQueryException - if queryString is empty

createBooleanQuery

IPTSBooleanQuery createBooleanQuery(int booleanOperator)
Construct an IPTSBooleanQuery that ANDs or ORs a number of child queries.

Parameters:
booleanOperator - one of PT_BOOLOPS.PT_BOOLOP_AND, PT_BOOLOPS.PT_BOOLOP_OR.

createPropertyFilterQuery

IPTSModifiableQuery createPropertyFilterQuery(IPTFilter filter)
Construct an IPTSQuery that wraps the provided IPTFilter.

Parameters:
filter - the filter to use as a search query.

createComparisonQuery

IPTSQuery createComparisonQuery(IPTSField booleanField,
                                boolean comparisonValue)
Construct an IPTSQuery for a comparison involving boolean fields.

Parameters:
booleanField - the field to compare. Must have type PTSFieldType.BOOLEAN to use this form of the constructor.
comparisonValue - either true or false.

createComparisonQuery

IPTSQuery createComparisonQuery(IPTSField numericField,
                                int comparisonOperator,
                                int comparisonValue)
Construct an IPTSQuery for a comparison involving integer, floating-point, or date fields.

Parameters:
numericField - the field to compare. Must have type PTSFieldType.INT, PTSFieldType.FLOAT, or PTSFieldType.DATETIME.
comparisonOperator - operator to use for the comparison. For integer or floating-point comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_LT, PT_FILTEROPS.PT_FILTEROP_GT, PT_FILTEROPS.PT_FILTEROP_LTE, PT_FILTEROPS.PT_FILTEROP_GTE, PT_FILTEROPS.PT_FILTEROP_EQ or PT_FILTEROPS.PT_FILTEROP_NUMERIC_EQ, PT_FILTEROPS.PT_FILTEROP_NE or PT_FILTEROPS.PT_FILTEROP_NUMERIC_NOTEQ. For date-time comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_RELATIVE_LT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_LTE, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GTE. (For date-time comparisons with other operators, use the form of createComparisonQuery that accepts an XPDateTime.)
comparisonValue - value to compare with. (For the relative date-time operators, this is a number of milliseconds relative to the time this method is called.)

createComparisonQuery

IPTSQuery createComparisonQuery(IPTSField numericField,
                                int comparisonOperator,
                                long comparisonValue)
Construct an IPTSQuery for a comparison involving integer, floating-point, or date fields.

Parameters:
numericField - the field to compare. Must have type PTSFieldType.INT, PTSFieldType.FLOAT, or PTSFieldType.DATETIME.
comparisonOperator - operator to use for the comparison. For integer or floating-point comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_LT, PT_FILTEROPS.PT_FILTEROP_GT, PT_FILTEROPS.PT_FILTEROP_LTE, PT_FILTEROPS.PT_FILTEROP_GTE, PT_FILTEROPS.PT_FILTEROP_EQ or PT_FILTEROPS.PT_FILTEROP_NUMERIC_EQ, PT_FILTEROPS.PT_FILTEROP_NE or PT_FILTEROPS.PT_FILTEROP_NUMERIC_NOTEQ. For date-time comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_RELATIVE_LT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_LTE, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GTE. (For date-time comparisons with other operators, use the form of createComparisonQuery that accepts an XPDateTime.)
comparisonValue - value to compare with. (For the relative date-time operators, this is a number of milliseconds relative to the time this method is called.)

createComparisonQuery

IPTSQuery createComparisonQuery(IPTSField numericField,
                                int comparisonOperator,
                                float comparisonValue)
Construct an IPTSQuery for a comparison involving integer, floating-point, or date fields.

Parameters:
numericField - the field to compare. Must have type PTSFieldType.INT, PTSFieldType.FLOAT, or PTSFieldType.DATETIME.
comparisonOperator - operator to use for the comparison. For integer or floating-point comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_LT, PT_FILTEROPS.PT_FILTEROP_GT, PT_FILTEROPS.PT_FILTEROP_LTE, PT_FILTEROPS.PT_FILTEROP_GTE, PT_FILTEROPS.PT_FILTEROP_EQ or PT_FILTEROPS.PT_FILTEROP_NUMERIC_EQ, PT_FILTEROPS.PT_FILTEROP_NE or PT_FILTEROPS.PT_FILTEROP_NUMERIC_NOTEQ. For date-time comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_RELATIVE_LT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_LTE, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GTE. (For date-time comparisons with other operators, use the form of createComparisonQuery that accepts an XPDateTime.)
comparisonValue - value to compare with. (For the relative date-time operators, this is a number of milliseconds relative to the time this method is called.)

createComparisonQuery

IPTSQuery createComparisonQuery(IPTSField dateField,
                                int comparisonOperator,
                                com.plumtree.openfoundation.util.XPDateTime comparisonValue)
Construct an IPTSQuery for a comparison involving a date/time field and a non-relative operator.

Parameters:
dateField - the field to compare. Must have type PTSFieldType.DATETIME.
comparisonOperator - operator to use for the comparison. Must be one of PT_FILTEROPS.PT_FILTEROP_LT, PT_FILTEROPS.PT_FILTEROP_GT, PT_FILTEROPS.PT_FILTEROP_LTE, PT_FILTEROPS.PT_FILTEROP_GTE, PT_FILTEROPS.PT_FILTEROP_EQ or PT_FILTEROPS.PT_FILTEROP_NUMERIC_EQ, PT_FILTEROPS.PT_FILTEROP_NE or PT_FILTEROPS.PT_FILTEROP_NUMERIC_NOTEQ.
comparisonValue - value to compare with. May not be null.

createBestBetTargetQuery

IPTSQuery createBestBetTargetQuery(java.lang.String trigger)
                                   throws PTSEmptyQueryException
Construct an IPTSQuery that returns the best bet targets for a specified trigger string.

This is not the usual way to use Best Bets - usually, you call useBestBets on an IPTSModifiableQuery, such as the TextQuery you get from createTextQuery. Calling IPTSModifiableQuery.useBestBets guarantees that the best bet targets will be the top-ranked results.

The query returned by createBestBetTargetQuery is intended for a "sponsored links"-style list in which only best bet targets appear. If you AND or OR more than one one BestBetTargetQuery together, the order of results is unpredictable.

Parameters:
trigger - the best bet trigger string desired.
Throws:
PTSEmptyQueryException - if trigger is empty

PortalCollection

IPTSPortalCollection PortalCollection()
Returns an IPTSPortalCollection that contains IPTSQuery and IPTSField instances related to the Plumtree Corporate Portal.


CollabCollection

IPTSCollabCollection CollabCollection()
Returns an IPTSCollabCollection that contains IPTSQuery and IPTSField instances related to Plumtree Collaboration Server.


ContentCollection

IPTSContentCollection ContentCollection()
Returns an IPTSContentCollection that contains IPTSQuery and IPTSField instances related to Plumtree Content Server.


createWeightedFieldList

IPTSWeightedFieldList createWeightedFieldList()
Returns an empty IPTSWeightedFieldList.


createAdmin

IPTSAdmin createAdmin()
Returns an IPTSAdmin instance that may be used for various search administration tasks.



Copyright © 2008 Plumtree Software Inc. All Rights Reserved.