On Sat, Mar 23, 2013 at 9:12 AM, jeffthorne <jeff.tho...@gmail.com> wrote: > Thanks for the response Mike and pointing me in the right direction. > > I see that > > TextField is indexed, tokenized, without term vectors > StringField is indexed, but not tokenized > > > If I wanted a stored field that is tokenized with stored term vectors would > this be the recommended approach? > > FieldType customFieldType = new FieldType(); > customFieldType.setStored(true); > customFieldType.setIndexed(true); > customFieldType.setTokenized(true); > customFieldType.setStoreTermVectors(true);
Yes, and maybe also .setStoreTermVectorOffsets/Positions(true). You can also start from an existing type, eg: FieldType ft = new FieldType(TextField.TYPE_STORED); ft.setStoreTermVectors(true); Mike McCandless http://blog.mikemccandless.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org