So I am trying to add a very simple search bar for my models. Here is my models file:
db = DAL('sqlite://storage.sqlite',
from gluon.tools import Auth
auth = Auth(db)
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False
auth.settings.reset_password_requires_verification = True
STORE_TYPE = ['Department store', 'Discount store', 'Warehouse store', 'Hardware store', 'Boutique']
db.employee.first_name.requires = IS_NOT_EMPTY()
db.employee.last_name.requires = IS_NOT_EMPTY()
db.employee.store_name.requires = IS_NOT_EMPTY()
db.employee.store_type.requires = IS_NOT_EMPTY()
db.employee.zip_code.requires = IS_NOT_EMPTY()
I was looking at the hastack plugin for web2py https://github.com/mdipierro/web2py-haystack. I am not sure how I would integrate elasticsearch with haystack since it isn't listed on the supported backends.
From the table employee I want to create searchable indexes for the fields store_name, store_type, zip_code.
I want to create a separate view something like default/search that just has a search bar with these fields. If someone could tell me how to do this that would be great? Also please tell me what I would need to add/change in the models and views.