def _search_database(self, fp, length, min_fp_id):
        # construct the query
        condition = sql.func.acoustid_extract_query(schema.fingerprint.c.fingerprint).op('&&')(sql.func.acoustid_extract_query(fp))
        if min_fp_id:
            condition = sql.and_(condition, schema.fingerprint.c.id > min_fp_id)
        query = self._create_search_query(fp, length, condition)
        # database scoring
        matches = self.db.execute(query).fetchall()
        return matches
dataset/ETHPy150Open lalinsky/acoustid-server/acoustid/data/fingerprint.py/FingerprintSearcher._search_database/original