Exemple #1
0
        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);

            SupportClass.CollectionsHelper.AddIfNotContains(state.flushedFiles, state.SegmentFileName(IndexFileNames.TERMS_EXTENSION));
            SupportClass.CollectionsHelper.AddIfNotContains(state.flushedFiles, 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);
			
			SupportClass.CollectionsHelper.AddIfNotContains(state.flushedFiles, state.SegmentFileName(IndexFileNames.TERMS_EXTENSION));
			SupportClass.CollectionsHelper.AddIfNotContains(state.flushedFiles, state.SegmentFileName(IndexFileNames.TERMS_INDEX_EXTENSION));
			
			termsWriter = new FormatPostingsTermsWriter(state, this);
		}
Exemple #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;
 }
		internal FormatPostingsTermsWriter(SegmentWriteState state, FormatPostingsFieldsWriter parent):base()
		{
			this.parent = parent;
			termsOut = parent.termsOut;
			docsWriter = new FormatPostingsDocsWriter(state, this);
		}
Exemple #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;
		}
Exemple #6
0
 internal FormatPostingsTermsWriter(SegmentWriteState state, FormatPostingsFieldsWriter parent) : base()
 {
     this.parent = parent;
     termsOut    = parent.termsOut;
     docsWriter  = new FormatPostingsDocsWriter(state, this);
 }