示例#1
0
 def set_search_engine(self, app, mapper):
     '''Set the full-text search engine.
     '''
     engine = app.config['SEARCHENGINE']
     if engine is None:
         engine = app.config['DATASTORE'].get('')
     odm = app.config['ODM']
     engine = odm.search_engine(engine)
     mapper.set_search_engine(engine)
示例#2
0
 def set_search_engine(self, app, mapper):
     '''Set the full-text search engine.
     '''
     engine = app.config['SEARCHENGINE']
     if engine is None:
         engine = app.config['DATASTORE'].get('')
     odm = app.config['ODM']
     engine = odm.search_engine(engine)
     mapper.set_search_engine(engine)
示例#3
0
 def create_search_engine(cls):
     return odm.search_engine(cls.models.default_store.dns)