mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
#589 - ElasticSearch - refactor to DocQueryContext
This commit is contained in:
1 parent
da8766533f
commit
37b86f2191
32 files changed
+155
-788
No files matched your search
@@ -28,19 +28,8 @@ class AllEqualsExpression extends NonPrepareExpression {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeElastic(ElasticExpressionContext context) throws IOException {
|
||||
|
||||
context.writeBoolMustStart();
|
||||
for (Map.Entry<String, Object> entry : propMap.entrySet()) {
|
||||
Object value = entry.getValue();
|
||||
String propName = entry.getKey();
|
||||
if (value == null) {
|
||||
context.writeExists(false, propName);
|
||||
} else {
|
||||
context.writeTerm(propName, value);
|
||||
}
|
||||
}
|
||||
context.writeBoolEnd();
|
||||
public void writeDocQuery(DocQueryContext context) throws IOException {
|
||||
context.writeAllEquals(propMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user