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

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

Open judzero opened this issue 1 year ago • 1 comments

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

judzero avatar Dec 13 '23 20:12 judzero