本文整理汇总了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);
}