My deepest apologies - I totally misspoke with my post yesterday. Chris, and the others, are correct - I wasn't thinking clearly and was confusing IndexReader.document() with Hits.doc().

So, as far as the exception goes - perhaps your servlet does not have access to the index because of permissions. Maybe you're using a different version of Lucene between the command-line and your web application?

        Erik

On Aug 4, 2004, at 3:14 AM, Christiaan Fluit wrote:

Erik Hatcher wrote:

Where did you get 'i'? Keep in mind that using Hits.doc(n) intends 'n' to be a document *id*, not the iteration through the Hits collection. This is a very common mistake, and I'm guessing one you've made here.

I believe the Javadoc (as well as my own experience) tells otherwise:

"public final Document doc(int n) throws IOException

    Returns the stored fields of the nth document in this set."


Regards,

Chris
--


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to