Lucene.Net.Index.SegmentInfos.Add C# (CSharp) Méthode

Add() public méthode

Appends the provided SegmentCommitInfo.
public Add ( Lucene.Net.Index.SegmentCommitInfo si ) : void
si Lucene.Net.Index.SegmentCommitInfo
Résultat void
        public void Add(SegmentCommitInfo si)
        {
            segments.Add(si);
        }

Usage Example

Exemple #1
0
        /// <summary> Adds a document to this index, using the provided analyzer instead of the
        /// value of {@link #GetAnalyzer()}.  If the document contains more than
        /// {@link #SetMaxFieldLength(int)} terms for a given field, the remainder are
        /// discarded.
        /// </summary>
        public virtual void  AddDocument(Document doc, Analyzer analyzer)
        {
            DocumentWriter dw = new DocumentWriter(ramDirectory, analyzer, this);

            dw.SetInfoStream(infoStream);
            System.String segmentName = NewSegmentName();
            dw.AddDocument(segmentName, doc);
            lock (this)
            {
                segmentInfos.Add(new SegmentInfo(segmentName, 1, ramDirectory));
                MaybeMergeSegments();
            }
        }
All Usage Examples Of Lucene.Net.Index.SegmentInfos::Add