コード例 #1
0
 public UintraElasticIndex(
     IElasticSearchRepository elasticSearchRepository,
     ISearchScoreProvider searchScoreProvider,
     IEnumerable <IElasticEntityMapper> mappers) : base(elasticSearchRepository, mappers)
 {
     scores = searchScoreProvider.GetScores();
 }
コード例 #2
0
 public HouseBrandsImportLogicImpl(IStagingRepository stagingRepository,
                                   IElasticSearchRepository elasticSearchRepository,
                                   IEventLogRepository eventLogRespository)
 {
     _stagingRepository       = stagingRepository;
     _elasticSearchRepository = elasticSearchRepository;
     _eventLog = eventLogRespository;
 }
コード例 #3
0
 public CategoriesImportLogicImpl(IStagingRepository stagingRepository,
                                  IElasticSearchRepository esRepository,
                                  IEventLogRepository eventLogRepository)
 {
     _stagingRepository       = stagingRepository;
     _elasticSearchRepository = esRepository;
     _eventLog = eventLogRepository;
 }
コード例 #4
0
 public IndexService(IElasticSearchRepository repository, IOptionsMonitor <ColidMessageQueueOptions> messageQueuingOptionsAccessor, ILogger <IndexService> logger, IConfiguration configuration)
 {
     _elasticSearchRepository = repository;
     _mqOptions        = messageQueuingOptionsAccessor.CurrentValue;
     _logger           = logger;
     _configuration    = configuration;
     _reindexingSwitch = _configuration.GetValue <bool>("ReindexSwitch");
     _logger.LogInformation($"ReindexSwitch is allowed {_reindexingSwitch}", _reindexingSwitch);
 }
コード例 #5
0
 public AddAllService(
     IGetAllPagingPostServiceQuery getAllPagingPostServiceQuery,
     IElasticSearchRepository <PostServiceViewModel> elasticSearchRepository,
     IDeleteAllService deleteAllService)
 {
     _getAllPagingPostServiceQuery = getAllPagingPostServiceQuery;
     _elasticSearchRepository      = elasticSearchRepository;
     _deleteAllService             = deleteAllService;
 }
コード例 #6
0
 public DocumentService(IOptionsMonitor <ColidMessageQueueOptions> messageQueuingOptionsAccessor, IElasticSearchRepository elasticSearchRepository,
                        ILogger <DocumentService> logger)
 {
     _mqOptions = messageQueuingOptionsAccessor.CurrentValue;
     _elasticSearchRepository = elasticSearchRepository;
     _serializerSettings      = new JsonSerializerSettings {
         ContractResolver = new CamelCasePropertyNamesContractResolver()
     };
     _logger = logger;
 }
コード例 #7
0
        public static IElasticSearchRepository <T> Page <T>(this IElasticSearchRepository <T> repo, int pageSize, int pageIndex) where T : class
        {
            var impl = repo as ElasticSearchRepository <T>;

            if (!impl.InitPage)
            {
                impl.searchParams.From((pageIndex - 1) * pageSize).Size(pageSize);
                impl.InitPage = true;
            }
            return(impl);
        }
コード例 #8
0
 public CatalogLogicImpl(ICatalogInternalRepository catalogRepository, IStagingRepository stagingRepository, IElasticSearchRepository elasticSearchRepository,
                         IEventLogRepository eventLog, IUserProfileLogic userProfile, IListLogic listLogic,
                         IMessagingLogic messageLogic)
 {
     this.catalogRepository       = catalogRepository;
     this.stagingRepository       = stagingRepository;
     this.elasticSearchRepository = elasticSearchRepository;
     this.eventLog         = eventLog;
     this.userProfileLogic = userProfile;
     this.listLogic        = listLogic;
     this.messageLogic     = messageLogic;
 }
コード例 #9
0
 public EventHandler(IGoodsRepository repository, IGoodsCategoryRepository categoryRepository, IEsGoodsRepository esGoodsRepository,
                     ILimitedTimeActivitieRepository limitrepository, IEventBus eventBus, IStateManager stateManager, IUnitofWork unitofWork,
                     EfDbContext efDbContext, IElasticSearchRepository <EsGoodsDto> searchRepository, IOrderQueryService orderQueryService,
                     ILocalEventBus localEventBus
                     )
 {
     this.repository         = repository;
     this.categoryRepository = categoryRepository;
     this.limitrepository    = limitrepository;
     this.unitofWork         = unitofWork;
     this.eventBus           = eventBus;
     this.stateManager       = stateManager;
     this.esGoodsRepository  = esGoodsRepository;
     this.efDbContext        = efDbContext;
     this.searchRepository   = searchRepository;
     this.orderQueryService  = orderQueryService;
     this.localEventBus      = localEventBus;
 }
コード例 #10
0
        public static IElasticSearchRepository <T> Sort <T>(this IElasticSearchRepository <T> repo, Expression <Func <T, dynamic> > sortfunc, bool desc) where T : class
        {
            var impl = repo as ElasticSearchRepository <T>;

            if (sortfunc != null)
            {
                var memberprop = GetMember(sortfunc.Body);
                var sortName   = CamelCase(memberprop.memberInfo.Name, memberprop.propertyInfo.PropertyType);
                if (desc)
                {
                    impl.sortQueries.Descending(sortName);
                }
                else
                {
                    impl.sortQueries.Ascending(sortName);
                }
            }
            return(impl);
        }
コード例 #11
0
 public DeleteService(IElasticSearchRepository <PostServiceViewModel> elasticSearchRepository)
 {
     _elasticSearchRepository = elasticSearchRepository;
 }