public static FhirIndex CreateIndex() { MongoDatabase database = MongoDbConnector.Database; MongoCollection<BsonDocument> collection = database.GetCollection(Spark.Search.Config.MONGOINDEXCOLLECTION); Definitions definitions = DefinitionsFactory.GenerateFromMetadata(); ISearcher searcher = new MongoSearcher(collection); IIndexer indexer = new MongoIndexer(collection, definitions); FhirIndex index = new FhirIndex(definitions, indexer, searcher); return index; }
public static FhirIndex CreateIndex() { MongoDatabase database = MongoDbConnector.Database; MongoCollection <BsonDocument> collection = database.GetCollection(Spark.Search.Config.MONGOINDEXCOLLECTION); Definitions definitions = DefinitionsFactory.GenerateFromMetadata(); ISearcher searcher = new MongoSearcher(collection); IIndexer indexer = new MongoIndexer(collection, definitions); FhirIndex index = new FhirIndex(definitions, indexer, searcher); return(index); }