Пример #1
0
 public ElasticInferrer(IConnectionSettings connectionSettings)
 {
     this._connectionSettings = connectionSettings;
     this.TypeNameResolver    = new TypeNameResolver();
     this.IdResolver          = new IdResolver();
     this.IndexNameResolver   = new IndexNameResolver(this._connectionSettings);
 }
Пример #2
0
        public Inferrer(IConnectionSettingsValues connectionSettings)
        {
            connectionSettings.ThrowIfNull(nameof(connectionSettings));
            _connectionSettings  = connectionSettings;
            IdResolver           = new IdResolver(connectionSettings);
            IndexNameResolver    = new IndexNameResolver(connectionSettings);
            RelationNameResolver = new RelationNameResolver(connectionSettings);
            FieldResolver        = new FieldResolver(connectionSettings);
            RoutingResolver      = new RoutingResolver(connectionSettings, IdResolver);

            CreateMultiHitDelegates =
                new ConcurrentDictionary <Type,
                                          Action <MultiGetResponseFormatter.MultiHitTuple, IJsonFormatterResolver, ICollection <IMultiGetHit <object> > > >();
            CreateSearchResponseDelegates =
                new ConcurrentDictionary <Type,
                                          Action <MultiSearchResponseFormatter.SearchHitTuple, IJsonFormatterResolver, IDictionary <string, IResponse> > >();
        }
Пример #3
0
 public string IndexName(IndexName index) => IndexNameResolver.Resolve(index);
Пример #4
0
 public string IndexName <T>() where T : class => IndexNameResolver.Resolve <T>();
Пример #5
0
 public PutWarmerDescriptor(IConnectionSettings connectionSettings)
 {
     this.typeNameResolver  = new TypeNameResolver();
     this.indexNameResolver = new IndexNameResolver(connectionSettings);
 }
Пример #6
0
 public GetWarmerDescriptor(IConnectionSettings connectionSettings)
 {
     this.indexNameResolver = new IndexNameResolver(connectionSettings);
 }