lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Field.Index deprecation ?
Date Fri, 22 Mar 2013 16:28:05 GMT
We badly need Lucene in Action 3rd edition!

The easiest approach is to use one of the new XXXField classes under
oal.document, eg StringField for your example.

If none of the existing XXXFields "fit", you can make a custom
FieldType, tweak all of its settings, and then create a Field from
that.

Mike McCandless

http://blog.mikemccandless.com

On Fri, Mar 22, 2013 at 11:22 AM, jeffthorne <jeff.thorne@gmail.com> wrote:
> I am new to Lucene and going through the Lucene in Action 2nd edition book. I
> have a quick question on the best way to add fields to a document now that
> Field.Index is deprecated.
>
> Here is what I am doing and what most example online suggest:
>
> doc.add(new Field("id", dbID, Store.YES,
> Field.Index.NOT_ANALYZED_NO_NORMS));
>
> What is the new recommended way to set Index properties on Fields with
> Field.Index going away? Can't seem to find anything online.
>
> Thanks for the help,
> Jeff
>
>
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Field-Index-deprecation-tp4050068.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message