예제 #1
0
 def commit_toc(self, storage, indexname, schema, segments, generation,
                clean=True):
     toc = TOC(schema, segments, generation)
     toc.write(storage, indexname)
     # Delete leftover files
     if clean:
         clean_files(storage, indexname, generation, segments)
예제 #2
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)
예제 #3
0
    def create_index(self, schema, indexname=_DEF_INDEX_NAME):
        from whoosh.filedb.fileindex import TOC, FileIndex

        if self.readonly:
            raise ReadOnlyError
        TOC.create(self, schema, indexname)
        return FileIndex(self, schema, indexname)
예제 #4
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)
예제 #5
0
    def create_index(self, schema, indexname=_DEF_INDEX_NAME):
        from whoosh.filedb.fileindex import TOC, FileIndex

        if self.readonly:
            raise ReadOnlyError
        TOC.create(self, schema, indexname)
        return FileIndex(self, schema, indexname)
예제 #6
0
 def commit_toc(self,
                storage,
                indexname,
                schema,
                segments,
                generation,
                clean=True):
     toc = TOC(schema, segments, generation)
     toc.write(storage, indexname)
     # Delete leftover files
     if clean:
         clean_files(storage, indexname, generation, segments)
예제 #7
0
    def create_index(self, schema, indexname=_DEF_INDEX_NAME):
        if self.readonly:
            raise ReadOnlyError

        TOC.create(self, schema, indexname)
        return FileIndex(self, schema, indexname)
예제 #8
0
파일: gae.py 프로젝트: intabeta/inta
    def create_index(self, schema, indexname=_DEF_INDEX_NAME):
        if self.readonly:
            raise ReadOnlyError

        TOC.create(self, schema, indexname)
        return FileIndex(self, schema, indexname)