com.google.appengine.api.search.dev
Class SnippetExpression
- java.lang.Object
-
- com.google.appengine.api.search.dev.Expression
-
- com.google.appengine.api.search.dev.SnippetExpression
-
public class SnippetExpression extends Expression
Expression which generates snippets from specified document.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.appengine.api.search.dev.Expression
Expression.Sorter
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description FieldValueeval(Document doc)Evaluate the expression to field value proto for the specified document.java.lang.StringevalHtml(Document doc)java.util.List<Expression.Sorter>getSorters(int sign, double defaultValueNumeric, java.lang.String defaultValueText)Get list of sort classes for the expression.static ExpressionmakeSnippetExpression(java.lang.String query, java.lang.String fieldName, java.util.Set<ContentType> fieldTypes, com.google.appengine.api.search.dev.NumericExpression maxCharsExpression, com.google.appengine.api.search.dev.NumericExpression maxSnippetsExpression)-
Methods inherited from class com.google.appengine.api.search.dev.Expression
makeValue
-
-
-
-
Method Detail
-
makeSnippetExpression
public static Expression makeSnippetExpression(java.lang.String query, java.lang.String fieldName, java.util.Set<ContentType> fieldTypes, com.google.appengine.api.search.dev.NumericExpression maxCharsExpression, com.google.appengine.api.search.dev.NumericExpression maxSnippetsExpression)
-
evalHtml
public java.lang.String evalHtml(Document doc) throws EvaluationException- Throws:
EvaluationException
-
eval
public FieldValue eval(Document doc) throws EvaluationExceptionDescription copied from class:ExpressionEvaluate the expression to field value proto for the specified document.- Specified by:
evalin classExpression- Throws:
EvaluationException
-
getSorters
public java.util.List<Expression.Sorter> getSorters(int sign, double defaultValueNumeric, java.lang.String defaultValueText)
Description copied from class:ExpressionGet list of sort classes for the expression. Usually it contains just one element, but for field expressions it can potentially return 2 sorters when both numeric and text fields exist with a field name.- Specified by:
getSortersin classExpression
-
-