You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: m20221115_000001_local_file_pathfix.rs
    path of file: ./repos/spyglass/crates/migrations/src
    
    the code of the file until where you have to start completion: use crate::sea_orm::Statement;
use sea_orm_migration::prelude::*;
use sea_orm_migration::sea_orm::ConnectionTrait;
use spyglass_searcher::schema::{DocFields, SearchDocument};

use shared::config::Config;
use tantivy::collector::TopDocs;
use tantivy::directory::MmapDirectory;
use tantivy::query::TermQuery;
use tantivy::schema::IndexRecordOption;
use tantivy::{Docume
    
    fn open_index(&self) -> (IndexWriter, IndexReader) {
        let config = Config::new();
        let schema = DocFields::as_schema();

        let dir = MmapDirectory::open(config.index_dir()).expect("Unable to create MmapDirectory");
        let index = Index::open_or_create(dir, schema).expect("Unable to open / create directory");

        let writer = index
            .writer(50_000_000)
            .expect("Unable to create index_writer");

        // For a search server you will typically create on reader for the entire
        // lifetime of your program.
        let reader = index
            .reader_builder()
            .reload_policy(ReloadPolicy::OnCommit)
            .try_into()
            .expect("Unable to create reader");

        (writer, reader)
    }