From ae3bed1f8bfcea7bd3000d308d53f0265c82ba85 Mon Sep 17 00:00:00 2001 From: jordanfung Date: Mon, 14 Oct 2013 18:44:10 +0800 Subject: [PATCH] Update flask_whooshee.py --- flask_whooshee.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flask_whooshee.py b/flask_whooshee.py index 1daccde..f250475 100644 --- a/flask_whooshee.py +++ b/flask_whooshee.py @@ -108,7 +108,7 @@ class Whooshee(object): model.query_class = WhoosheeQuery return wh - def register_model(self, analyzer=None, *index_fields): + def register_model(self, *index_fields, **kw): # construct subclass of AbstractWhoosheer for a model class ModelWhoosheer(AbstractWhoosheer): pass @@ -125,7 +125,7 @@ class Whooshee(object): primary = field.name schema_attrs[field.name] = whoosh.fields.NUMERIC(stored=True, unique=True) elif field.name in index_fields: - schema_attrs[field.name] = whoosh.fields.TEXT(analyzer=analyzer) + schema_attrs[field.name] = whoosh.fields.TEXT(**kw) mwh.schema = whoosh.fields.Schema(**schema_attrs) # we can't check with isinstance, because ModelWhoosheer is private # so use this attribute to find out