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)
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)
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)
def searcher(self): self._check_state() from whoosh.filedb.fileindex import FileIndex return FileIndex(self.storage, indexname=self.indexname).searcher()
def open_index(self, indexname=_DEF_INDEX_NAME, schema=None): from whoosh.filedb.fileindex import FileIndex return FileIndex(self, schema=schema, indexname=indexname)
def create_index(self, schema, indexname=_DEF_INDEX_NAME): from whoosh.filedb.fileindex import FileIndex return FileIndex(self, schema=schema, create=True, indexname=indexname)
def open_index(storage, schema, indexname): from whoosh.filedb.fileindex import FileIndex return FileIndex(storage, schema=schema, indexname=indexname)
def open_index(self, indexname=_DEF_INDEX_NAME, schema=None): return FileIndex(self, schema=schema, indexname=indexname)
def create_index(self, schema, indexname=_DEF_INDEX_NAME): if self.readonly: raise ReadOnlyError _create_index(self, schema, indexname) return FileIndex(self, schema, indexname)