开发者

NHibernate Search FieldAttribute

I am not sure what are the parameters Index.Tokenized and Store actually meam, and how the value affect the index result? What is the difference between 2 properties below?

class A{
  [Field(Index.Tokenized, Store = Store.Yes)]
  public virtual string P1 {
    get;
    set;
  }

  [Field]
  public virtual string P2 {
    get;
    set;
  }
}

Than开发者_JS百科ks

Hardy


Index.Tokenized means that the field will be tokenized.

Store.Yes means that the field will be stored in index.

Full explanation here : Lucene indexing: Store and indexing modes explained

[Field]
public virtual string P2 {
  get;
  set;
}

is equivalent to

[Field(Index.Tokenized, Store = Store.No)]
public virtual string P2 {
  get;
  set;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜