public void UpdateIndeces(IPublishingStrategy sender, PublishEventArgs <IContent> args)
 {
     foreach (var node in args.PublishedEntities.Where(x => x.ContentType.Alias == Blogpost.ModelTypeAlias))
     {
         MongoIndexer.Index(node.Id);
         LuceneIndexer.Index(node.Id);
         PetaPocoIndexer.Index(node.Id);
     }
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public object RebuildMongo(bool status = false)
 {
     return(MongoIndexer.Rebuild(status));
 }