flask-msearch icon indicating copy to clipboard operation
flask-msearch copied to clipboard

AttributeError: 'Query' object has no attribute 'msearch'

Open thisisashukla opened this issue 3 years ago • 1 comments

Hi Team, I am following the example given in the README for this repository. I am getting the following error message:

AttributeError: 'Query' object has no attribute 'msearch'

I am getting this on the following line:

results = Post.query.msearch(keyword,fields=['title'],limit=20).filter(...)

Thanks for any help on this.

thisisashukla avatar Nov 26 '21 18:11 thisisashukla

Whether the app has been initialized?using Search(app) or search.init_app(app) https://github.com/honmaple/flask-msearch/blob/45c576cf393fb4d2eee500102d583f7989ba3473/flask_msearch/backends.py#L141

honmaple avatar Nov 30 '21 02:11 honmaple