class Product(db.model):
__searchable__ = ['title', 'description']
__analyzer__ = StemmingAnalyzer()
__tablename__ = "Product"
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(100), nullable=False)
description = db.Column(db.Text, nullable=True)
query = request.args.get('q', '') -> Organization
products = Product.query.search(query, limit=num_posts)
@datapilot.before_first_request
def bootstrap():
flask_whooshalchemy3.search_index(datapilot, Product)
The query variable is being passed but the SQL query is built into SELECT * From Product WHERE null
The query variable is being passed but the SQL query is built into
SELECT * From Product WHERE null