Saturday, February 25, 2006

Lucene Field Types

The following are the field types in Lucene for my (and your) reference

Text: "tokenized and indexed, and is stored in the index" "Term vector will not be stored for this field"

Field.Store.YES, Field.Index.TOKENIZED
Field(name, value)
Field(name, value, storeTermVector)
Field(name, value, Field.Store.YES, Field.Index.TOKENIZED, storeTermVector)
Field(name, value, Field.Store.YES, Field.Index.TOKENIZED)


Unindexed: "not tokenized nor indexed, but is stored in the index"

Field.Index.NO
e.g. Field(name, value, Field.Store.YES, Field.Index.NO)


Unstored: "tokenized and indexed, but that is not stored in the index"

Field(name, value, Field.Store.NO, Field.Index.TOKENIZED)
and
Field(name, value, Field.Store.NO, Field.Index.TOKENIZED, storeTermVector)



Keyword: "not tokenized, but is indexed and stored"

Field(name, value, Field.Store.YES, Field.Index.UN_TOKENIZED)

1 Comments:

At 4:42 AM, Blogger miztaken said...

Can we have Field with no Name.
What is the default Field, can you give an example of Default Field and un-named field.
As my field name keeps changing so i dont want to keep field name. Is it possible.

 

Post a Comment

<< Home

eXTReMe Tracker