public LinqToAlgoliaIndex(AlgoliaSearchContext context,
                                  IExecutionContext executionContext)
        {
            Assert.ArgumentNotNull(context, "context");
            _context = context;

            var index = context.Index as AlgoliaBaseIndex;

            if (index == null)
            {
                throw new ArgumentException("context.Index should be instance of AlgoliaBaseIndex");
            }

            _repository          = index.Repository;
            _configuration       = context.Index.Configuration;
            _queryOptimizer      = new AlgoliaQueryOptimizer();
            _mapper              = new AlgoliaQueryMapper();
            _fieldNameTranslator = context.Index.FieldNameTranslator;
        }
 public LinqToAlgoliaIndex(AlgoliaSearchContext context) : this(context, null)
 {
 }