flask-msearch
flask-msearch copied to clipboard
AttributeError: 'Query' object has no attribute 'msearch'
Im trying to use msearch for an ecommerce website I have followed everything and tried every possible code that i have read on README
@app.route('/result')
def result():
searchword = request.form.get('q')
products = Addproduct.query.msearch(searchword, fields=['name']).all()
return render_template('products/result.html',products=products)
the application runs when this code
search = Search()
but when you put the "app" in either
search = Search()
search.init_app(app)
it shows many errors Please Help