示例#1
0
 public UnitOfWork(Nest.IElasticClient client)
 {
     _client      = client;
     _logger      = Log.Logger.For <UnitOfWork>();
     _pendingDocs = new Dictionary <string, Nest.IBulkOperation>();
     _versions    = new Dictionary <string, long>();
 }
 public ElasticSearchRepository(
     Nest.IElasticClient elasticClient,
     IEventBus eventBus
     )
 {
     this.elasticClient = elasticClient ?? throw new ArgumentNullException(nameof(elasticClient));
     this.eventBus      = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
 }
示例#3
0
 private Task CreateReportIndicMapping(Nest.IElasticClient esClient)
 {
     return(esClient.MapAsync <Report>(m =>
                                       m.Properties(pd =>
                                                    pd.Object <JObject>(otd => otd.Name(r => r.CustomData).Dynamic(false))
                                                    )
                                       ));
 }
        private Task CreateRankedScoreMapping(Nest.IElasticClient client)
        {
            return(client.MapAsync <ScoreRecord>(m =>
                                                 m.DynamicTemplates(templates => templates
                                                                    .DynamicTemplate("dates", t => t
                                                                                     .Match("CreatedOn")
                                                                                     .Mapping(ma => ma.Date(s => s))
                                                                                     )
                                                                    .DynamicTemplate("score", t =>
                                                                                     t.MatchMappingType("string")
                                                                                     .Mapping(ma => ma.String(s => s.Index(Nest.FieldIndexOption.NotAnalyzed)))
                                                                                     )


                                                                    )
                                                 ));
        }
示例#5
0
 public Select(Nest.IElasticClient client)
 {
     _client = client;
 }
示例#6
0
 public MeetingQueryHandler(
     Nest.IElasticClient elasticClient
     )
 {
     this.elasticClient = elasticClient ?? throw new ArgumentNullException(nameof(elasticClient));
 }
 public Index(Nest.IElasticClient client)
 {
     _client = client;
 }
示例#8
0
 public OfferQueryHandler(Nest.IElasticClient elasticClient) => this.elasticClient = elasticClient;
 public HandleSearchMeetings(
     Nest.IElasticClient elasticClient
     )
 {
     this.elasticClient = elasticClient ?? throw new ArgumentNullException(nameof(elasticClient));
 }
示例#10
0
 public OfferEventHandler(Nest.IElasticClient elasticClient) => this.elasticClient = elasticClient;