Exemplo n.º 1
0
def create_index(storage, schema, indexname):
    from whoosh.filedb.fileindex import TOC, FileIndex

    if storage.readonly:
        raise ReadOnlyError
    TOC.create(storage, schema, indexname)
    return FileIndex(storage, schema, indexname)
Exemplo n.º 2
0
    def create_index(self, schema, indexname=_DEF_INDEX_NAME):
        if self.readonly:
            raise ReadOnlyError

        from whoosh.filedb.fileindex import _create_index, FileIndex
        _create_index(self, schema, indexname)
        return FileIndex(self, schema, indexname)
Exemplo n.º 3
0
    def reader(self, reuse=None):
        self._check_state()
        from whoosh.filedb.fileindex import FileIndex

        return FileIndex._reader(self.storage,
                                 self.schema,
                                 self.segments,
                                 self.generation,
                                 reuse=reuse)
Exemplo n.º 4
0
    def reader(self, reuse=None):
        self._check_state()
        from whoosh.filedb.fileindex import FileIndex

        return FileIndex._reader(self.storage, self.schema, self.segments,
                                 self.generation, reuse=reuse)
Exemplo n.º 5
0
 def searcher(self):
     self._check_state()
     from whoosh.filedb.fileindex import FileIndex
     return FileIndex(self.storage, indexname=self.indexname).searcher()
Exemplo n.º 6
0
 def open_index(self, indexname=_DEF_INDEX_NAME, schema=None):
     from whoosh.filedb.fileindex import FileIndex
     return FileIndex(self, schema=schema, indexname=indexname)
Exemplo n.º 7
0
 def create_index(self, schema, indexname=_DEF_INDEX_NAME):
     from whoosh.filedb.fileindex import FileIndex
     return FileIndex(self, schema=schema, create=True, indexname=indexname)
Exemplo n.º 8
0
def open_index(storage, schema, indexname):
    from whoosh.filedb.fileindex import FileIndex

    return FileIndex(storage, schema=schema, indexname=indexname)
Exemplo n.º 9
0
 def open_index(self, indexname=_DEF_INDEX_NAME, schema=None):
     return FileIndex(self, schema=schema, indexname=indexname)
Exemplo n.º 10
0
    def create_index(self, schema, indexname=_DEF_INDEX_NAME):
        if self.readonly:
            raise ReadOnlyError

        _create_index(self, schema, indexname)
        return FileIndex(self, schema, indexname)