#NEWLINE# @ classmethod #NEWLINE# def range( cls , field , from_value = None , to_value = None , include_lower = None , include_upper = None ) : #NEWLINE# #INDENT# '\n        http://www.elasticsearch.org/guide/reference/query-dsl/range-filter.html\n\n        Filters documents with fields that have terms within a certain range. Similar to range query, except that it acts as a filter. Can be placed within queries that accept a filter.\n        ' #NEWLINE# instance = cls ( { #NEWLINE# #INDENT# 'range' : { #NEWLINE# #INDENT# field : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( from_value is not None ) : #NEWLINE# #INDENT# instance [ 'range' ] [ field ] [ 'from' ] = from_value #NEWLINE# #UNINDENT# if ( to_value is not None ) : #NEWLINE# #INDENT# instance [ 'range' ] [ field ] [ 'to' ] = to_value #NEWLINE# #UNINDENT# if ( include_lower is not None ) : #NEWLINE# #INDENT# instance [ 'range' ] [ field ] [ 'include_lower' ] = include_lower #NEWLINE# #UNINDENT# if ( include_upper is not None ) : #NEWLINE# #INDENT# instance [ 'range' ] [ field ] [ 'include_upper' ] = include_upper #NEWLINE# #UNINDENT# return instance