Re: Error running Lucene in Action code

2007-12-07 Thread syedfa
Thanks for the reply Erik. However, my follow up question is this: What about the block of code that appears in the startElement() method: if(atts.getLength()>0){ attributeMap=new HashMap(); Do we need to modify it at all in anyway? Your suggestion works, but isn't this redundant?

Re: Error running Lucene in Action code

2007-12-07 Thread Erik Hatcher
Fayyaz - that is the incorrect action to take. That will cause future documents to have fields from all previous ones! All you have to do is: private HashMap attributeMap = new HashMap(); Erik On Dec 6, 2007, at 9:53 PM, syedfa wrote: Thanks very much for your reply. I co

Re: Error running Lucene in Action code

2007-12-06 Thread syedfa
Thanks very much for your reply. I commented out the line: attributeMap.clear(); in the startElement() method, and the code ran! Thanks for your prompt reply, and my apologies for the delay in responding. All the best. Fayyaz Michael McCandless-2 wrote: > > > I think you need to initial

Re: Error running Lucene in Action code

2007-12-05 Thread syedfa
I'll give it a try. I would be surprised if that is the problem, since the code is straight from the book. Let's see what happens. Fayyaz Michael McCandless-2 wrote: > > > I think you need to initialize attributeMap, eg add " = new HashMap()" in > the declaration? > > Mike > > "syedfa"

Re: Error running Lucene in Action code

2007-12-05 Thread Michael McCandless
I think you need to initialize attributeMap, eg add " = new HashMap()" in the declaration? Mike "syedfa" <[EMAIL PROTECTED]> wrote: > > Dear Fellow Java & Lucene developers: > > I am a Java developer learning lucene and I am currently going through the > book Lucene in Action. At present, I a