def _get_whoosh_schema_and_primary_key(model, analyzer):
    schema = {}
    primary = None
    searchable = set(model.__searchable__)

    for field in model.__table__.columns:
        if field.primary_key:
            schema[field.name] = whoosh.fields.ID(stored=True, unique=True)
            primary = field.name

        if searchable in field.name and isinstance(field.type,
                (sqlalchemy.types.Text, sqlalchemy.types.String,
                    sqlalchemy.types.Unicode)):

            schema[field.name] = whoosh.fields.TEXT(analyzer=analyzer)

    return Schema(**schema), primary
dataset/ETHPy150Open gyllstromk/Flask-WhooshAlchemy/flask_whooshalchemy.py/_get_whoosh_schema_and_primary_key/swapped operands of `in`