Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #5
0
 def searcher(self):
     self._check_state()
     from whoosh.filedb.fileindex import FileIndex
     return FileIndex(self.storage, indexname=self.indexname).searcher()
Beispiel #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)
Beispiel #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)
Beispiel #8
0
def open_index(storage, schema, indexname):
    from whoosh.filedb.fileindex import FileIndex

    return FileIndex(storage, schema=schema, indexname=indexname)
Beispiel #9
0
 def open_index(self, indexname=_DEF_INDEX_NAME, schema=None):
     return FileIndex(self, schema=schema, indexname=indexname)
Beispiel #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)