code: def search_mappings(kb, key=None, value=None, match_type=None,
                          sortby=None, page=None, per_page=None):
          
          if kb.kbtype == models.KnwKB.KNWKB_TYPES['written_as']:
              return pagination.RestfulSQLAlchemyPagination(
                  api.query_kb_mappings(
                      kbid=kb.id,
                      key=key or '',
                      value=value or '',
                      match_type=match_type or 's',
                      sortby=sortby or 'to',
                  ), page=page or 1, per_page=per_page or 10
              ).items
          return []
docs: Search tags for knowledge.