Blog_mini icon indicating copy to clipboard operation
Blog_mini copied to clipboard

[ok] now the fulltext search(FTS) of blog article works well. support chinese FTS(新增全文搜索功能)

Open kerneltravel opened this issue 8 years ago • 4 comments

to FTS the articles's title/summary/contens. use python's Flask-WhooshAlchemy+jieba tokenizer. based on Flask-WhooshAlchemyPlus . Note the Flask-WhooshAlchemyPlus V 0.7.4 should update flask_whooshalchemyplus.py's line 151 return self.filter('null') with return self.filter(sqlalchemy.text('null')) in case of this issue

kerneltravel avatar Apr 02 '16 13:04 kerneltravel

requirements.txt should updated to:

-r requirements/common.txt gunicorn==19.4.5 psycopg2==2.6.1 Flask-WhooshAlchemyPlus>=0.7.4

kerneltravel avatar Apr 02 '16 14:04 kerneltravel

@kerneltravel 非常感谢你的奉献,但我以最新一次提交测试时,发现下面的几个问题:

  • 不输入内容搜索会出现werkzeug.routing.BuildError错误
  • 文章点击进去后显示whoosh.fields.UnknownFieldError错误
  • 搜索后显示不出文章内容
  • 另外对于账户的管理没有界面 希望可以跟进一下。

xpleaf avatar Apr 04 '16 15:04 xpleaf

好的,收到

kerneltravel avatar Apr 11 '16 01:04 kerneltravel

搜索后显示不出文章内容,因为新工程目录内数据库的文章(某种操作后)还没在whoosh_index生成对应的索引信息,就搜索不到。 而用mysql 做中文全文索引就没有这个问题,mysql5.7做全文索引就不用去额外维护文件了,所以mysql的全文搜索方案更方便些。

kerneltravel avatar Sep 13 '16 07:09 kerneltravel