Hi Mike, Thanks for your Reply.
Contents are Getting Indexed..In MultiReader the other two fields are coming except the field(ContentIndex.KEY_TEXTCONTENT) which i indexed like below FieldType offsetsType = new FieldType(TextField.TYPE_STORED); offsetsType.setIndexed(true); offsetsType.setStored(true); offsetsType.setStoreTermVectors(true); offsetsType.setTokenized(true); offsetsType.setStoreTermVectorOffsets(true); offsetsType.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS); Document doc = new Document(); Field body = new Field(ContentIndex.KEY_TEXTCONTENT, "", offsetsType); body.setStringValue(content); Any problem with the above indexing methodology..Basically I am Indexing like this for implementing Postings Highlighter.. Please kindly help.. On Tue, Jul 16, 2013 at 5:06 PM, Michael McCandless < luc...@mikemccandless.com> wrote: > MultiFields.getFields returns null if the reader has no postings. Are > you sure you actually indexed any content? > > Mike McCandless > > http://blog.mikemccandless.com > > > On Tue, Jul 16, 2013 at 3:06 AM, VIGNESH S <vigneshkln...@gmail.com> > wrote: > > Hi, > > > > I am creating index like this in\\using Lucene 4.3.1 > > > > I am using 3 fields like > > > > FieldType offsetsType = new FieldType(TextField.TYPE_STORED); > > offsetsType.setIndexed(true); > > offsetsType.setStored(true); > > offsetsType.setStoreTermVectors(true); > > offsetsType.setTokenized(true); > > offsetsType.setStoreTermVectorOffsets(true); > > > offsetsType.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS); > > Document doc = new Document(); > > Field body = new Field(ContentIndex.KEY_TEXTCONTENT, "", offsetsType); > > body.setStringValue(content); > > > > > > In Search, I am using code like this > > > > Fields fields = MultiFields.getFields(mReader); > > > > It returns null in Fields..What can be the problem > > > > > > > > > > > > -- > > 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 > > -- Thanks and Regards Vignesh Srinivasan 9739135640