com.primus.searchcommon.constraint
Class KeywordConstraint
java.lang.Object
com.primus.searchcommon.constraint.BaseConstraint
com.primus.searchcommon.constraint.KeywordConstraint
- All Implemented Interfaces:
- DocumentSetConstraint, java.io.Serializable
public class KeywordConstraint
- extends BaseConstraint
This constraint is used for keyword constraints on the query. There
are three types of keywords constraints and corresponding constants are
as follows.
- ALL - All keywords must be present
- ANY - Any one of the keywords must be present
- NOTANY - None of the keywords must be present
-
The keywords should be delimited by space.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
ALL
|
static java.lang.String |
ANY
|
static java.lang.String |
CLASS_VERSION
|
static java.lang.String |
NOTANY
|
Constructor Summary |
KeywordConstraint(java.lang.String pMode,
java.lang.String pValue)
|
Method Summary |
java.lang.String |
getMode()
|
java.lang.String |
getValue()
|
java.lang.String |
toXml()
Converts this constraint to the XML representation that can be sent in the ES Query. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CLASS_VERSION
public static final java.lang.String CLASS_VERSION
- See Also:
- Constant Field Values
ALL
public static final java.lang.String ALL
- See Also:
- Constant Field Values
ANY
public static final java.lang.String ANY
- See Also:
- Constant Field Values
NOTANY
public static final java.lang.String NOTANY
- See Also:
- Constant Field Values
KeywordConstraint
public KeywordConstraint(java.lang.String pMode,
java.lang.String pValue)
- Parameters:
pMode
- The mode (ALL/ANY/NOTANY) for this constraint. Use the constants.pValue
- The keywords separated by space.
getMode
public java.lang.String getMode()
- Returns:
- Returns the mode.
getValue
public java.lang.String getValue()
- Returns:
- Returns the value.
toXml
public java.lang.String toXml()
- Description copied from interface:
DocumentSetConstraint
- Converts this constraint to the XML representation that can be sent in the ES Query.
- Returns: