def init(self):
    self.overall_search_type = ''
    self.columns = []
    self.look_ahead_columns = []
    self.relevant = self.get_option('relevant')
    self.mode = self.get_option('mode')
    self.keyword_search_type = ''
    self.keyword_map_search_type = ''
    if (self.mode == 'keyword_tree'):
        self.keyword_search_type = (self.get_option('keyword_search_type') or 'workflow/base_keyword')
        self.keyword_map_search_type = (self.get_option('keyword_map_search_type') or 'workflow/keyword_map')
    self.cross_db = (self.get_option('cross_db') == 'true')
    column = self.get_option('column')
    full_text_column = self.get_option('full_text_column')
    if column:
        if (self.mode == 'global'):
            raise SetupException('You are advised to use [keyword] mode since you have specified the column option.')
        self.columns = column.split('|')
        self.look_ahead_columns = self.columns[:]
    if full_text_column:
        self.columns = [full_text_column]
    self.case_sensitive = (self.kwargs.get('case_sensitive') in ['true', True])
    self.do_search = self.kwargs.get('do_search')
    self.script_path = self.kwargs.get('script_path')
    if (not self.mode):
        self.mode = 'keyword'
    from pyasm.search import Sql
    database_type = Sql.get_default_database_type()
    has_index = False
    if (database_type == 'PostgreSQL'):
        database_version = Sql.get_default_database_version()
        major = database_version[0]
        minor = database_version[1]
        if (major >= 9):
            has_index = True
        elif (major < 8):
            has_index = False
        elif (minor >= 4):
            has_index = True
        else:
            has_index = False
    self.has_index = has_index
def init(self):
    self.overall_search_type = 
    self.columns = []
    self.look_ahead_columns = []
    self.relevant = self.get_option('relevant')
    self.mode = self.get_option('mode')
    self.keyword_search_type = 
    self.keyword_map_search_type = 
    if (self.mode == 'keyword_tree'):
        self.keyword_search_type = (self.get_option('keyword_search_type') or 'workflow/base_keyword')
        self.keyword_map_search_type = (self.get_option('keyword_map_search_type') or 'workflow/keyword_map')
    self.cross_db = (self.get_option('cross_db') == 'true')
    column = self.get_option('column')
    full_text_column = self.get_option('full_text_column')
    if column:
        if (self.mode == 'global'):
            raise SetupException('You are advised to use [keyword] mode since you have specified the column option.')
        self.columns = column.split('|')
        self.look_ahead_columns = self.columns[:]
    if full_text_column:
        self.columns = [full_text_column]
    self.case_sensitive = (self.kwargs.get('case_sensitive') in ['true', True])
    self.do_search = self.kwargs.get('do_search')
    self.script_path = self.kwargs.get('script_path')
    if (not self.mode):
        self.mode = 'keyword'
    from pyasm.search import Sql
    database_type = Sql.get_default_database_type()
    has_index = False
    if (database_type == 'PostgreSQL'):
        database_version = Sql.get_default_database_version()
        major = database_version[0]
        minor = database_version[1]
        if (major >= 9):
            has_index = True
        elif (major < 8):
            has_index = False
        elif (minor >= 4):
            has_index = True
        else:
            has_index = False
    self.has_index = has_index