public FormatPostingsFieldsWriter(SegmentWriteState state, FieldInfos fieldInfos) : base()
        {
            dir             = state.directory;
            segment         = state.segmentName;
            totalNumDocs    = state.numDocs;
            this.fieldInfos = fieldInfos;
            termsOut        = new TermInfosWriter(dir, segment, fieldInfos, state.termIndexInterval);

            // TODO: this is a nasty abstraction violation (that we
            // peek down to find freqOut/proxOut) -- we need a
            // better abstraction here whereby these child consumers
            // can provide skip data or not
            skipListWriter = new DefaultSkipListWriter(termsOut.skipInterval, termsOut.maxSkipLevels, totalNumDocs, null, null);

            state.flushedFiles.Add(state.SegmentFileName(IndexFileNames.TERMS_EXTENSION));
            state.flushedFiles.Add(state.SegmentFileName(IndexFileNames.TERMS_INDEX_EXTENSION));

            termsWriter = new FormatPostingsTermsWriter(state, this);
        }
		public FormatPostingsFieldsWriter(SegmentWriteState state, FieldInfos fieldInfos):base()
		{
			
			dir = state.directory;
			segment = state.segmentName;
			totalNumDocs = state.numDocs;
			this.fieldInfos = fieldInfos;
			termsOut = new TermInfosWriter(dir, segment, fieldInfos, state.termIndexInterval);
			
			// TODO: this is a nasty abstraction violation (that we
			// peek down to find freqOut/proxOut) -- we need a
			// better abstraction here whereby these child consumers
			// can provide skip data or not
			skipListWriter = new DefaultSkipListWriter(termsOut.skipInterval, termsOut.maxSkipLevels, totalNumDocs, null, null);
			
			state.flushedFiles.Add(state.SegmentFileName(IndexFileNames.TERMS_EXTENSION));
			state.flushedFiles.Add(state.SegmentFileName(IndexFileNames.TERMS_INDEX_EXTENSION));
			
			termsWriter = new FormatPostingsTermsWriter(state, this);
		}
Example #3
0
 internal TermInfosWriter(Directory directory, System.String segment, FieldInfos fis, int interval)
 {
     Initialize(directory, segment, fis, interval, false);
     other       = new TermInfosWriter(directory, segment, fis, interval, true);
     other.other = this;
 }
Example #4
0
 internal FormatPostingsTermsWriter(SegmentWriteState state, FormatPostingsFieldsWriter parent) : base()
 {
     this.parent = parent;
     termsOut    = parent.termsOut;
     docsWriter  = new FormatPostingsDocsWriter(state, this);
 }
Example #5
0
		internal TermInfosWriter(Directory directory, System.String segment, FieldInfos fis, int interval)
		{
			Initialize(directory, segment, fis, interval, false);
			other = new TermInfosWriter(directory, segment, fis, interval, true);
			other.other = this;
		}
		internal FormatPostingsTermsWriter(SegmentWriteState state, FormatPostingsFieldsWriter parent):base()
		{
			this.parent = parent;
			termsOut = parent.termsOut;
			docsWriter = new FormatPostingsDocsWriter(state, this);
		}