#594 - ElasticSearch - Add match / TextExpression support (Full text search expression)

This commit is contained in:
Robin Bygrave
2016-03-09 21:48:22 +13:00
parent 3c63b79324
commit 34dcc98908
37 changed files with 860 additions and 79 deletions
@@ -1,5 +1,7 @@
package com.avaje.ebean;
import com.avaje.ebean.search.Match;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@@ -285,6 +287,11 @@ public interface ExpressionFactory {
*/
Expression raw(String raw);
/**
* Create a Text Match expression (currently doc store/Elastic only).
*/
Expression textMatch(String propertyName, String search, Match options);
/**
* And - join two expressions with a logical and.
*/
@@ -319,4 +326,12 @@ public interface ExpressionFactory {
* Return a list of expressions that will be joined by OR's.
*/
<T> Junction<T> disjunction(Query<T> query, ExpressionList<T> parent);
/**
* Return a Text query junction for MUST, SHOULD or MUST NOT.
* <p>
* This is doc store Elastic only.
* </p>
*/
<T> TextJunction<T> textJunction(Query<T> query, TextExpressionList<T> parent, TextJunction.Type type);
}