def IDENTITY(val):
if not val:<EOL><INDENT>return None<EOL><DEDENT>if not isinstance(val, six.string_types_ex):<EOL><INDENT>val = str(val)<EOL><DEDENT>return [val]<EOL>
This is a basic "equality" index keygen, primarily meant to be used for
things like::

    Model.query.filter(col='value')

Where ``FULL_TEXT`` would transform a sentence like "A Simple Sentence" into
an inverted index searchable by the words "a", "simple", and/or "sentence",
``IDENTITY`` will only be searchable by the orginal full sentence with the
same capitalization - "A Simple Sentence". See ``IDENTITY_CI`` for the
same function, only case-insensitive.