class_docstr: Matches documents containing any terms in a given range.
  
  >>> # Match documents where the indexed "id" field is greater than or equal
  >>> # to 'apple' and less than or equal to 'pear'.
  >>> TermRange("id", u"apple", u"pear")
class_docstr_tok: ["Matches","documents","containing","any","terms","in","a","given","range",".",">",">",">","#","Match","documents","where","the","indexed","``","id","''","field","is","greater","than","or","equal",">",">",">","#","to","'apple","'","and","less","than","or","equal","to","'pear","'",".",">",">",">","TermRange","(","``","id","''",",","u","''","apple","''",",","u","''","pear","''",")"]
code: def _btexts(self, ixreader):
      fieldname = self.fieldname
      field = ixreader.schema[fieldname]
      startexcl = self.startexcl
      endexcl = self.endexcl
  
      if self.start is None:
          start = b("")
      else:
          try:
              start = field.to_bytes(self.start)
          except ValueError:
              return
  
      if self.end is None:
          end = b("\xFF\xFF\xFF\xFF")
      else:
          try:
              end = field.to_bytes(self.end)
          except ValueError:
              return
  
      for fname, t in ixreader.terms_from(fieldname, start):
          if fname != fieldname:
              break
          if t == start and startexcl:
              continue
          if t == end and endexcl:
              break
          if t > end:
              break
          yield t
  
imports: from __future__ import division
  from whoosh.compat import b, u
  from whoosh.query import qcore, terms, compound, wrappers
  from whoosh.util.times import datetime_to_long
label_desc: Use image node_id 3 for calling the TermRange obj's underlying member method code with example usage: obj._btexts(ixreader) without return types