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


C# Store.IsStored方法代码示例

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


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

示例1: Field

        /// <summary> Create a stored field with binary value. Optionally the value may be compressed.
        /// 
        /// </summary>
        /// <param name="name">The name of the field
        /// </param>
        /// <param name="value_Renamed">The binary value
        /// </param>
        /// <param name="offset">Starting offset in value where this Field's bytes are
        /// </param>
        /// <param name="length">Number of bytes to use for this Field, starting at offset
        /// </param>
        /// <param name="store">How <c>value</c> should be stored (compressed or not)
        /// </param>
        /// <throws>  IllegalArgumentException if store is <c>Store.NO</c>  </throws>
        public Field(System.String name, byte[] value_Renamed, int offset, int length, Store store)
        {
            
            if (name == null)
                throw new System.ArgumentException("name cannot be null");
            if (value_Renamed == null)
                throw new System.ArgumentException("value cannot be null");
            
            this.internalName = StringHelper.Intern(name); // field names are interned
            fieldsData = value_Renamed;
            
            if (store == Store.NO)
                throw new System.ArgumentException("binary values can't be unstored");

            internalIsStored = store.IsStored();
            internalIsIndexed = false;
            internalIsTokenized = false;
            internalOmitTermFreqAndPositions = false;
            internalOmitNorms = true;
            
            internalIsBinary = true;
            internalBinaryLength = length;
            internalbinaryOffset = offset;
            
            SetStoreTermVector(TermVector.NO);
        }
开发者ID:modulexcite,项目名称:Xamarin-Lucene.Net,代码行数:40,代码来源:Field.cs


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