Yes, you need to store it; this is where PH gets the "original" content from for highlighting.
Alternatively you can store/retrieve this content yourself and pass it to PH. But, what NPE did you hit? We should improve that if we can... Mike McCandless http://blog.mikemccandless.com On Mon, Nov 25, 2013 at 6:43 AM, VIGNESH S <vigneshkln...@gmail.com> wrote: > Hi, > > I tried indexing for PostingsHighligher with > TextField."TYPE_NOT_STOREDTYPE_STORED" and used postings highlighter..iam > getting null pointer Exception. > > But if i use TextField.TYPE_STORED it is working properly.. > > can,t i use postingshighlighter without storing ?.Please kindly Help. > > Below is the sample code i used for indexing > > > offsetsType= new FieldType(TextField.TYPE_NOT_STOREDTYPE_STORED); > > offsetsType.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS); > field = new Field("contents","", offsetsType); > > > > > > > -- > Thanks and Regards > Vignesh Srinivasan > 9739135640 --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org