lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <simon.willna...@googlemail.com>
Subject Re: Field.Store & Field.Index
Date Sun, 27 Feb 2011 10:13:43 GMT
On Sun, Feb 27, 2011 at 11:02 AM, aneuryzma <patrick.diviacco@gmail.com> wrote:
> It is not clear to me how these parameters of
> org.apache.lucene.document.Field class
>  exactly work:
>
> Field.Store.YES / NO
> If I set them to NO, then I don't save the content itself but only metadata
> about it ?

YES ->  From JavaDoc:
     * Store the original field value in the index. This is useful for
short texts
     * like a document's title which should be displayed with the results. The
     * value is stored in its original form, i.e. no analyzer is used
before it is
     * stored.

NO -> means you don't store the content of the field at all. this
simply disables this feature entirely.

>
> and
>
> Field.Index.ANALYZED / NOT ANALYZED
> If I set NOT_ANALYZED I don't perform any processing such as stemming, or
> stop words on the content ?

ANALYZED -> you pass the content of the field (which you would store
if Store.YES) through an analyzer (the one that is given to your
IndexWriter) to process it. The resulting terms are used to build
Lucene's reverse index.

NOT_ANALYZED -> the entire content of the field is treated as a single
token and added to the reverse index. No analysis will be applied. The
given Analyzer is ignored for this field.

hope that helps

simon
>
> thanks
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Field-Store-Field-Index-tp2587314p2587314.html
> Sent from the Lucene - General mailing list archive at Nabble.com.
>

Mime
View raw message