#NEWLINE# def __init__( self , fieldname , words , boost = 1.0 ) : #NEWLINE# #INDENT# '\n        fieldname is the name of the field to search. start and end are the\n        lower and upper (inclusive) bounds of the range of tokens to match.\n        boost is a boost factor that should be applied to the raw score of\n        results matched by this query.\n        ' #NEWLINE# self . fieldname = fieldname #NEWLINE# if ( ( len ( words ) < 2 ) or ( len ( words ) > 2 ) ) : #NEWLINE# #INDENT# raise QueryError ( ( 'TermRange argument %r should be [startword, endword]' % words ) ) #NEWLINE# #UNINDENT# self . start = words [ 0 ] #NEWLINE# self . end = words [ 1 ] #NEWLINE# self . words = self #NEWLINE# self . boost = boost