コード例 #1
0
 public OutputReduceIndexWriteOperation(MapReduceIndex index, LuceneVoronDirectory directory, LuceneDocumentConverterBase converter, Transaction writeTransaction,
                                        LuceneIndexPersistence persistence, JsonOperationContext indexContext)
     : base(index, directory, converter, writeTransaction, persistence)
 {
     Debug.Assert(index.OutputReduceToCollection != null);
     _txHolder = new TransactionHolder(writeTransaction);
     _outputReduceToCollectionCommand = index.OutputReduceToCollection.CreateCommand(indexContext, _txHolder);
 }
コード例 #2
0
        public DeleteReduceOutputDocumentsCommand(DocumentDatabase database, string documentsPrefix, string originalPattern, int batchSize) : base(database)
        {
            if (OutputReduceToCollectionCommand.IsOutputDocumentPrefix(documentsPrefix) == false)
            {
                throw new ArgumentException($"Invalid prefix to delete: {documentsPrefix}", nameof(documentsPrefix));
            }

            _documentsPrefix = documentsPrefix;
            _batchSize       = batchSize;

            if (string.IsNullOrEmpty(originalPattern) == false)
            {
                _originalPattern = originalPattern;
                _originalPatternForReduceOutputReferences = new OutputReferencesPattern(database, originalPattern);
            }
        }