示例#1
0
        public IIndexer <TransactionForFunctionVO <TFunctionMessage> > CreateIndexerForFunctionMessage <TFunctionMessage, TSearchDocument>(
            string indexName, Func <TransactionForFunctionVO <TFunctionMessage>, TSearchDocument> mapper, int documentsPerBatch = 1)
            where TFunctionMessage : FunctionMessage, new()
            where TSearchDocument : class, IHasId
        {
            var indexClient  = GetOrCreateIndexClient(indexName);
            var azureIndexer = new AzureFunctionIndexer <TFunctionMessage, TSearchDocument>(indexClient, mapper, documentsPerBatch);

            _indexers.Add(azureIndexer);
            return(azureIndexer);
        }
示例#2
0
        public IIndexer <TransactionForFunctionVO <TFunctionMessage> > CreateIndexerForFunctionMessage <TFunctionMessage>(
            string indexName, int documentsPerBatch = 1)
            where TFunctionMessage : FunctionMessage, new()
        {
            var indexClient     = GetOrCreateIndexClient(indexName);
            var indexDefinition = new FunctionIndexDefinition <TFunctionMessage>(indexName);
            var azureIndexer    = new AzureFunctionIndexer <TFunctionMessage>(indexClient, indexDefinition, documentsPerBatch);

            _indexers.Add(azureIndexer);
            return(azureIndexer);
        }