Skip to content

Commit

Permalink
#83 Fix withParent operator
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed May 16, 2019
1 parent 18150b5 commit e685cf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/org/elastic4play/services/QueryDSL.scala
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ object QueryDSL {
def in(values: String*) = QueryDef(nestedField(field, termsQuery(_, values)))
}

def ofType(value: String) = QueryDef(termQuery("_type", value))
def ofType(value: String) = QueryDef(termQuery("relations", value))
def withId(entityIds: String*): QueryDef = QueryDef(idsQuery(entityIds))
def any: QueryDef = QueryDef(matchAllQuery)
def contains(field: String): QueryDef = QueryDef(nestedField(field, existsQuery))
Expand All @@ -106,6 +106,6 @@ object QueryDSL {
def withParent(parent: BaseEntity): QueryDef = withParent(parent.model.modelName, parent.id)

def withParent(parentType: String, parentId: String): QueryDef =
QueryDef(hasParentQuery(parentType, idsQuery(parentId).types(parentType), false))
QueryDef(hasParentQuery(parentType, idsQuery(parentId), false))
def string(queryString: String): QueryDef = QueryDef(query(queryString))
}

0 comments on commit e685cf3

Please sign in to comment.