Skip to content

Commit 00945bd

Browse files
DOC-5102 added Go CountOnly search example
1 parent 71a2ec2 commit 00945bd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

content/develop/clients/go/queryjson.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ Specify query options to return only the `city` field:
102102
{{< clients-example go_home_json query2 >}}
103103
{{< /clients-example >}}
104104

105+
You can also use the same query with the `CountOnly` option
106+
enabled to get the number of documents found without
107+
returning the documents themselves.
108+
109+
{{< clients-example go_home_json query2count_only >}}
110+
{{< /clients-example >}}
111+
105112
Use an
106113
[aggregation query]({{< relref "/develop/interact/search-and-query/query/aggregation" >}})
107114
to count all users in each city.

0 commit comments

Comments
 (0)