#NEWLINE# @ property #NEWLINE# def projects( self ) : #NEWLINE# #INDENT# ret = self . es . search ( index = self . index , doc_type = self . __type__ , body = { #NEWLINE# #INDENT# 'aggs' : { #NEWLINE# #INDENT# 'projects' : { #NEWLINE# #INDENT# 'terms' : { #NEWLINE# #INDENT# 'field' : 'project' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , _source = False ) #NEWLINE# return [ each [ 'key' ] for each in ret [ 'aggregations' ] [ 'projects' ] . get ( 'buckets' , [ ] ) ]