public DocumentUpsertTransaction( string directory, Compression compression, DocumentStream documents, IWriteSessionFactory writeSessionFactory = null, IDocumentWriteCommand documentWriteCommand = null) : this(directory, documents) { var factory = writeSessionFactory ?? new WriteSessionFactory(directory); WriteSession = factory.OpenWriteSession(compression); DocumentWriteCommand = documentWriteCommand ?? new DocumentWriteCommand(); }
public FullTextUpsertTransaction( string directory, IAnalyzer analyzer, Compression compression, DocumentStream documents, IFullTextWriteSessionFactory writeSessionFactory = null, IDocumentWriteCommand documentWriteCommand = null) : base(directory, documents) { _analyzer = analyzer; _treeBuilder = new TreeBuilder(); var factory = writeSessionFactory ?? new FullTextWriteSessionFactory(directory); WriteSession = factory.OpenWriteSession(compression, _treeBuilder); DocumentWriteCommand = documentWriteCommand ?? new FullTextDocumentWriteCommand(_analyzer, _treeBuilder); }