Interface ContentExpression
-
- All Superinterfaces:
Expression
,OrderableExpression
,ScalarExpression
public interface ContentExpression extends ScalarExpression
An expression for searching on any indexed content.The ContentExpression lets you build a a predicate that searches in all indexed content in the iKnowBase data store, based on the metadata definitions of attributes.
The ContentExpression cannot be used as a select-expression, nor for ordering.
Example
query1 = factory.builder().where(contentExpression().exact("Find this exact phrase").build(); query2 = factory.builder().where(contentExpression().any("noreg", "norge", "norway").build(); query3 = factory.builder().where(contentExpression().all("liverpool", "leeds").build();
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Predicate
all(String... words)
Creates a predicate searching for all of the specified words.Predicate
any(String... words)
Creates a predicate searching for any of the specified words.Predicate
exact(String phrase)
Creates a a predicate searching for an exact phrase.-
Methods inherited from interface com.iknowbase.api.contentservices.query.content.expressions.Expression
getObjectReference
-
Methods inherited from interface com.iknowbase.api.contentservices.query.content.expressions.OrderableExpression
asc, desc, order, order
-
Methods inherited from interface com.iknowbase.api.contentservices.query.content.expressions.ScalarExpression
isNotNull, isNull
-
-
-
-
Method Detail
-
exact
Predicate exact(String phrase)
Creates a a predicate searching for an exact phrase.- Parameters:
phrase
- phrase to search for- Returns:
- a new Predicate
-
any
Predicate any(String... words)
Creates a predicate searching for any of the specified words.- Parameters:
words
- words to search for- Returns:
- a new Predicate
-
-