As this more of an Elasticsearch question than Kibana, I'm moving it to the Elasticsearch category. If there is a followup Kibana question to this, feel free to move it to the Kibana category at that time.
If I understand your question correctly, you want the resulting hits in the response to only show the geoip.country_code field (as opposed to all the fields under _source. To do this you can use source filtering to only include the geoip.country_code field in the results.
Of course, this would give you all values in the geoip.country_code, as opposed to just the unique ones. If you want unique ones you can use the terms aggregation on the geoip.country_code field. Note that, in this case, you might as well specify size as 0 as the unique list of terms you are looking for will be in the aggregations section of the response, not the hits section.
Thanks for your reply. I have your first option working but getting unique string values is much better as you suggested. I have checked the aggregrations link you provided and have this so far:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.