Skip to content

Commit

Permalink
Support where in aggregate functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeramor authored Sep 11, 2023
1 parent 905dd3a commit 6afa653
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/weaviate/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def get(
def aggs(
class_name:,
fields: nil,
where: nil,
object_limit: nil,
near_text: nil,
near_vector: nil,
Expand All @@ -59,6 +60,7 @@ def aggs(
aggs_query(
class_name: class_name,
fields: fields,
where: where,
near_text: near_text,
near_vector: near_vector,
near_image: near_image,
Expand Down Expand Up @@ -183,6 +185,7 @@ def get_query(
def aggs_query(
class_name:,
fields:,
where: nil,
near_text: nil,
near_vector: nil,
near_image: nil,
Expand All @@ -200,7 +203,8 @@ def aggs_query(
#{near_text.present? ? "nearText: #{near_text}" : ""},
#{near_vector.present? ? "nearVector: #{near_vector}" : ""},
#{near_image.present? ? "nearImage: #{near_image}" : ""},
#{near_object.present? ? "nearObject: #{near_object}" : ""}
#{near_object.present? ? "nearObject: #{near_object}" : ""},
#{where.present? ? "where: #{where}" : ""}
) {
#{fields}
}
Expand Down

0 comments on commit 6afa653

Please sign in to comment.