code: def term_vector(self, params):
          '''
          params are either True/False, 'with_offsets', 'with_positions', 'with_positions_offsets'
          '''
          if params == True:
              self[self.field]['term_vector'] = 'yes'
          elif params == False:
              self[self.field]['term_vector'] = 'no'
          else:
              self[self.field]['term_vector'] = params
          return self term_vector(self, params):
          '''
          params are either True/False, 'with_offsets', 'with_positions', 'with_positions_offsets'
          '''
          if params == True:
              self[self.field]['term_vector'] = 'yes'
          elif params == False:
              self[self.field]['term_vector'] = 'no'
          else:
              self[self.field]['term_vector'] = params
          return self
docs: params are either True/False, 'with_offsets', 'with_positions', 'with_positions_offsets'