code: def set_dyn_config(self, field, expression, collection=None):
          
          if self.kbdefs:
              # update
              self.kbdefs.output_tag = field
              self.kbdefs.search_expression = expression
              self.kbdefs.collection = collection
              db.session.merge(self.kbdefs)
          else:
              # insert
              self.kbdefs = KnwKBDDEF(output_tag=field,
                                      search_expression=expression,
                                      collection=collection)
docs: Set dynamic configuration.