0

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;
  }
}

Thanks

Hardy

hardywang
  • 4,864
  • 11
  • 65
  • 101

1 Answers1

1

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;
}
Community
  • 1
  • 1
mathieu
  • 30,974
  • 4
  • 64
  • 90