Package com.attivio.sdk.search.fields
Class MatchingFields
- java.lang.Object
-
- com.attivio.sdk.search.fields.FieldExpression
-
- com.attivio.sdk.search.fields.MatchingFields
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class MatchingFields extends FieldExpression
FieldExpression to provide the list of fields that matched during query execution.This is useful if performing an OR query across multiple fields, as this field expression will indicate what fields provided the match for the OR for each respective matching document.
PERFORMANCE NOTE: this field expression can be quite costly. It will cause the query execution to be upwards of 2x slower than normal query execution without requesting matching fields.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.fields.FieldExpression
FieldExpression.StringMode
-
-
Field Summary
-
Fields inherited from class com.attivio.sdk.search.fields.FieldExpression
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description MatchingFields()Construct a new MatchingFields.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)java.lang.StringgetLabel()Get the name of the query parameter that will be used to label matching subqueries.SchemaField.TypegetType(Schema schema)Resolve the type for this expression.booleanhasChildren()Returnstrueif this field expression has any sub FieldExpressions.inthashCode()booleanisConstant()Returnstrueif this field expression evaluates to a constant value.voidsetLabel(java.lang.String value)Get the name of the query parameter that will be used to label matching subqueries.protected voidtoString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)Writes the string representation of this field expression tobuffer.static MatchingFieldsvalueOf(StringParser reader)-
Methods inherited from class com.attivio.sdk.search.fields.FieldExpression
apply, clone, copyOf, forEachField, forEachPhrase, forEachQuery, getDefaultName, getFieldName, isConstant, parse, quote, rewrite, rewrite, rewriteChildren, toString, toString, valueOf
-
-
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
Get the name of the query parameter that will be used to label matching subqueries.If null, matching subqueries will be collected and labeled by field name.
-
setLabel
public void setLabel(java.lang.String value)
Get the name of the query parameter that will be used to label matching subqueries.If null, matching subqueries will be collected and labeled by field name.
-
hasChildren
public boolean hasChildren()
Returnstrueif this field expression has any sub FieldExpressions.- Specified by:
hasChildrenin classFieldExpression
-
isConstant
public boolean isConstant()
Returnstrueif this field expression evaluates to a constant value.- Specified by:
isConstantin classFieldExpression
-
getType
public SchemaField.Type getType(Schema schema)
Resolve the type for this expression.- Specified by:
getTypein classFieldExpression
-
toString
protected void toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)Writes the string representation of this field expression tobuffer.- Specified by:
toStringin classFieldExpression
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classFieldExpression
-
valueOf
public static MatchingFields valueOf(StringParser reader)
-
-