Re: MultiFields.getReader() returns null

2013-07-17 Thread Michael McCandless
Hmm, OK. Does your custom analyzer produce any tokens for the content you are indexing? Mike McCandless http://blog.mikemccandless.com On Wed, Jul 17, 2013 at 9:03 AM, VIGNESH S wrote: > Hi Mike, > > I am Using a Custom Analyzer. > > Fields fields = MultiFields.getFields(reader); > > Terms t

Re: MultiFields.getReader() returns null

2013-07-17 Thread VIGNESH S
Hi Mike, I am Using a Custom Analyzer. Fields fields = MultiFields.getFields(reader); Terms trm = fields.terms(CONTENT_FIELD); ---> Came null when i used TextField others when i use fields.terms(),it came proper. On Wed, Jul 17, 2013 at 6:00 PM, Michael McCandless < luc...@mikemccandless.co

Re: MultiFields.getReader() returns null

2013-07-17 Thread Michael McCandless
On Wed, Jul 17, 2013 at 1:52 AM, VIGNESH S wrote: > Hi Mike, > > The Problem I mentioned is I used 3 Fields subject title, Content. > > I indexed Subject and Title like this.. > > doc.add(new StringField(subject, mAccountId, Field.Store.YES)); > > doc.add(new StringField(title, mSearchParam, Field

Re: MultiFields.getReader() returns null

2013-07-16 Thread VIGNESH S
Hi Mike, The Problem I mentioned is I used 3 Fields subject title, Content. I indexed Subject and Title like this.. doc.add(new StringField(subject, mAccountId, Field.Store.YES)); doc.add(new StringField(title, mSearchParam, Field.Store.YES)); I indexed Content like this[as a TextField] Field

Re: MultiFields.getReader() returns null

2013-07-16 Thread Michael McCandless
I'm confused about the problem: exactly which method call is returning null? What do yo umean by "it is coming in the contents of MultiReader"? Maybe post a full working test showing the problem? Your indexing code looks correct, except if you are using only PostingsHighlighter you don't need to

Re: MultiFields.getReader() returns null

2013-07-16 Thread VIGNESH S
Hi Mike, If i use StringField.Type_STORED instead of TextField.Type_Stored it is coming in the contents of MultiReader.. On Tue, Jul 16, 2013 at 7:16 PM, VIGNESH S wrote: > Hi Mike, > > Thanks for your Reply. > > Contents are Getting Indexed..In MultiReader the other two fields are > coming e

Re: MultiFields.getReader() returns null

2013-07-16 Thread VIGNESH S
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

Re: MultiFields.getReader() returns null

2013-07-16 Thread Michael McCandless
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 wrote: > Hi, > > I am creating index like this in\\using Lucene 4.3.1 > > I am using 3 fie

MultiFields.getReader() returns null

2013-07-16 Thread VIGNESH S
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.setStoreTe