Package com.google.appengine.api.search
Class FieldExpression
- java.lang.Object
-
- com.google.appengine.api.search.FieldExpression
-
public class FieldExpression extends Object
Represents an expression bound to a returned Field with the given name. FieldExpressions are added to aQueryOptions, to request an expression computed and returned as the named Field value. For example,
binds a snippet expression to a Field named "snippet", which will be returned in each search result. In this case the returned "snippet" Field will contain a HTML value containing text snippets of the "content" field matching the query "good story".FieldExpression.newBuilder() .setName("snippet") .setExpression("snippet(\"good story\", content)") .build()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFieldExpression.BuilderA field expression builder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetExpression()StringgetName()static FieldExpression.BuildernewBuilder()StringtoString()
-
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the name of the expression
-
getExpression
public String getExpression()
- Returns:
- the expression string used to create a field
-
newBuilder
public static FieldExpression.Builder newBuilder()
- Returns:
- returns a new FieldExpression builder.
-
-