params are either True/False, 'with_offsets', 'with_positions', 'with_positions_offsets'

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