@staticmethod<EOL><INDENT>def compile_schema(fields):<DEDENT>
path = os.path.dirname(os.path.realpath(__file__))<EOL>with codecs.open("<STR_LIT>" % path, '<STR_LIT:r>', '<STR_LIT:utf-8>') as fh:<EOL><INDENT>schema_template = fh.read()<EOL><DEDENT>schema = schema_template.format('<STR_LIT:\n>'.join(fields))<EOL>if six.PY2:<EOL><INDENT>return schema.encode('<STR_LIT:utf-8>')<EOL><DEDENT>return schema<EOL>
joins schema fields with base solr schema

:param list[str] fields: field list
:return: compiled schema
:rtype: byte