def __init__(self, db):
     IndexerBase.__init__(self, db)
     self.db_path = db.config.DATABASE
     self.reindex = 0
     self.writer = None
     self.index = None
     self.deleted = set()
Example #2
0
 def __init__(self, db):
     IndexerBase.__init__(self, db)
     self.db_path = db.config.DATABASE
     self.reindex = 0
     self.writer = None
     self.index = None
     self.deleted = set()
 def __init__(self, db):
     IndexerBase.__init__(self, db)
     self.db = db
     if db.conn.server_version < 110000:
         db.sql("select version()")
         server_descr = db.cursor.fetchone()
         raise ValueError("Postgres native_fts indexing requires postgres "
                          "11.0 or newer. Server is version: %s" %
                          server_descr)
     self.reindex = 0
     self.query_language = True
Example #4
0
    def __init__(self, db):
        IndexerBase.__init__(self, db)
        self.indexdb_path = os.path.join(db.config.DATABASE, 'indexes')
        self.indexdb = os.path.join(self.indexdb_path, 'index.db')
        self.reindex = 0
        self.quiet = 9
        self.changed = 0

        # see if we need to reindex because of a change in code
        version = os.path.join(self.indexdb_path, 'version')
        if (not os.path.exists(self.indexdb_path)
                or not os.path.exists(version)):
            # for now the file itself is a flag
            self.force_reindex()
        elif os.path.exists(version):
            version = open(version).read()
            # check the value and reindex if it's not the latest
            if version.strip() != '1':
                self.force_reindex()
    def __init__(self, db):
        IndexerBase.__init__(self, db)
        self.indexdb_path = os.path.join(db.config.DATABASE, 'indexes')
        self.indexdb = os.path.join(self.indexdb_path, 'index.db')
        self.reindex = 0
        self.quiet = 9
        self.changed = 0

        # see if we need to reindex because of a change in code
        version = os.path.join(self.indexdb_path, 'version')
        if (not os.path.exists(self.indexdb_path) or
                not os.path.exists(version)):
            # for now the file itself is a flag
            self.force_reindex()
        elif os.path.exists(version):
            version = open(version).read()
            # check the value and reindex if it's not the latest
            if version.strip() != '1':
                self.force_reindex()
Example #6
0
 def __init__(self, db):
     IndexerBase.__init__(self, db)
     self.db = db
     self.reindex = 0
 def __init__(self, db):
     IndexerBase.__init__(self, db)
     self.db_path = db.config.DATABASE
     self.reindex = 0
     self.transaction_active = False
 def __init__(self, db):
     IndexerBase.__init__(self, db)
     self.db_path = db.config.DATABASE
     self.reindex = 0
     self.transaction_active = False
Example #9
0
 def __init__(self, db):
     IndexerBase.__init__(self, db)
     self.db = db
     self.reindex = 0
 def __init__(self, db):
     IndexerBase.__init__(self, db)
     self.db = db
     self.reindex = 0
     self.query_language = True