当前位置: 首页>>代码示例>>C#>>正文


C# Lucene.Net.Store.IndexInput.readStringStringMap方法代码示例

本文整理汇总了C#中Lucene.Net.Store.IndexInput.readStringStringMap方法的典型用法代码示例。如果您正苦于以下问题:C# Lucene.Net.Store.IndexInput.readStringStringMap方法的具体用法?C# Lucene.Net.Store.IndexInput.readStringStringMap怎么用?C# Lucene.Net.Store.IndexInput.readStringStringMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lucene.Net.Store.IndexInput的用法示例。


在下文中一共展示了Lucene.Net.Store.IndexInput.readStringStringMap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SegmentInfo

        /// <summary> Construct a new SegmentInfo instance by reading a
        /// previously saved SegmentInfo from input.
        /// 
        /// </summary>
        /// <param name="dir">directory to load from
        /// </param>
        /// <param name="format">format of the segments info file
        /// </param>
        /// <param name="input">input handle to read segment info from
        /// </param>
        internal SegmentInfo(Directory dir, int format, IndexInput input)
        {
            this.dir = dir;
            name = input.ReadString();
            docCount = input.ReadInt();
            if (format <= SegmentInfos.FORMAT_LOCKLESS)
            {
                delGen = input.ReadLong();
                if (format <= SegmentInfos.FORMAT_SHARED_DOC_STORE)
                {
                    docStoreOffset = input.ReadInt();
                    if (docStoreOffset != - 1)
                    {
                        docStoreSegment = input.ReadString();
                        docStoreIsCompoundFile = (1 == input.ReadByte());
                    }
                    else
                    {
                        docStoreSegment = name;
                        docStoreIsCompoundFile = false;
                    }
                }
                else
                {
                    docStoreOffset = - 1;
                    docStoreSegment = name;
                    docStoreIsCompoundFile = false;
                }
                if (format <= SegmentInfos.FORMAT_SINGLE_NORM_FILE)
                {
                    hasSingleNormFile = (1 == input.ReadByte());
                }
                else
                {
                    hasSingleNormFile = false;
                }
                int numNormGen = input.ReadInt();
                if (numNormGen == NO)
                {
                    normGen = null;
                }
                else
                {
                    normGen = new long[numNormGen];
                    for (int j = 0; j < numNormGen; j++)
                    {
                        normGen[j] = input.ReadLong();
                    }
                }
                isCompoundFile = (sbyte) input.ReadByte();
                preLockless = (isCompoundFile == CHECK_DIR);
                if (format <= SegmentInfos.FORMAT_DEL_COUNT)
                {
                    delCount = input.ReadInt();
                    System.Diagnostics.Debug.Assert(delCount <= docCount);
                }
                else
                    delCount = - 1;
                if (format <= SegmentInfos.FORMAT_HAS_PROX)
                    hasProx = input.ReadByte() == 1;
                else
                    hasProx = true;

                if (format <= SegmentInfos.FORMAT_DIAGNOSTICS)
                {
                    diagnostics = input.readStringStringMap();
                }
                else
                {
                    diagnostics = (System.Collections.IDictionary) new System.Collections.Hashtable();
                }
            }
            else
            {
                delGen = CHECK_DIR;
                normGen = null;
                isCompoundFile = (sbyte) (CHECK_DIR);
                preLockless = true;
                hasSingleNormFile = false;
                docStoreOffset = - 1;
                docStoreIsCompoundFile = false;
                docStoreSegment = null;
                delCount = - 1;
                hasProx = true;
                diagnostics = (System.Collections.IDictionary) new System.Collections.Hashtable();
            }
        }
开发者ID:BackupTheBerlios,项目名称:lyra2-svn,代码行数:97,代码来源:SegmentInfo.cs


注:本文中的Lucene.Net.Store.IndexInput.readStringStringMap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。