Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Does Flask-WhooshAlchemy not support Chinese? #46
I have setup Flask-WhooshAlchemy in my project.
I try to use Flask-WhooshAlchemy to query database with some English character information. It is fine.
But I use Chinese to query database, I alway get a empty array.
It is my models:
class Post(db.Model): __tablename__ = 'posts' __searchable__ = ['title'] # these fields will be indexed by whoosh id = db.Column(db.Integer, primary_key=True) title = db.Column(db.Text)
It is what I do and what it show to me:
>>> p = Post(title='my third and last post 失意时行不行') >>> db.session.add(p) >>> db.session.commit() >>> Post.query.whoosh_search('my').all() [<app.models.Post object at 0x10629f630>] >>> Post.query.whoosh_search('行不行').all()