#NEWLINE# def test_GeoBoundingBoxFilter( self ) : #NEWLINE# #INDENT# gq = GeoBoundingBoxFilter ( 'pin.location' , location_tl = { #NEWLINE# #INDENT# 'lat' : 40.717 , #NEWLINE# 'lon' : 70.99 , #NEWLINE# #UNINDENT# } , location_br = { #NEWLINE# #INDENT# 'lat' : 40.03 , #NEWLINE# 'lon' : 72.0 , #NEWLINE# #UNINDENT# } ) #NEWLINE# q = FilteredQuery ( MatchAllQuery ( ) , gq ) #NEWLINE# resultset = self . conn . search ( query = q , indices = [ 'test-mindex' ] ) #NEWLINE# self . assertEqual ( resultset . total , 1 ) #NEWLINE# gq = GeoBoundingBoxFilter ( 'pin.location' , [ 70.99 , 40.717 ] , [ 74.1 , 40.03 ] ) #NEWLINE# q = FilteredQuery ( MatchAllQuery ( ) , q ) #NEWLINE# result2 = self . conn . search ( query = q , indices = [ 'test-mindex' ] ) #NEWLINE# self . assertEqual ( result2 . total , 1 )