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 <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]