Thank you Mike,

Much appreciated :-)




________________________________
 From: Michael McCandless <luc...@mikemccandless.com>
To: java-user@lucene.apache.org; kiwi clive <kiwi_cl...@yahoo.com> 
Sent: Monday, March 18, 2013 4:14 PM
Subject: Re: Lucene 4.1 org.apache.lucene.document.Field Deprecation
 
You need to create your own FieldType, e.g.:

  FieldType textWithTermVectors = new FieldType(TextField.TYPE_STORED);
  textWithTermVectors.setStoreTermVectorstrue);
  textWithTermVectors.setStoreTermVectorPositions(true);

Then create new Field("name", "value", textWithTermVectors) and add
that to your document.

Mike McCandless

http://blog.mikemccandless.com


On Mon, Mar 18, 2013 at 12:08 PM, kiwi clive <kiwi_cl...@yahoo.com> wrote:
> Hi chaps,
>
> Lucene 4.1.0:
>
> I notice org.apache.lucene.document.Field(String name, String value, 
> Field.Store store, Field.Index index, Field.TermVector termVector) is marked 
> as deprecated while its suggested replacements (TextField and StringField) to 
> not seem to have support for Term Vectors.
>
>
> Is there an equivalent of STORED=NO, ANALYZED=YES and 
> TERMVECTORS_WITH_POSITIONS in the new API?
>
> Apologies if I've missed something, but I don't want to lose this 
> functionality!
>
> Thanks,
> Clive

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

Reply via email to