Re: Problem in Coding, to get the DOC ID from HITS

2008-02-23 Thread Erick Erickson
You have to set the Hits object to the results of a search. See Searcher.search() On Fri, Feb 22, 2008 at 4:32 PM, sumittyagi <[EMAIL PROTECTED]> wrote: > > here is my code > package db; > import java.io.*; > import java.util.*; > import java.lang.*; > import org.apache.lucene.search.Hits; > impo

RE: Problem in Coding, to get the DOC ID from HITS

2008-02-22 Thread Dharmalingam Ganesan
Of course, these are programming errors nothing really related to Lucene. Hits hits; Int hitCount = hits.length This does not make sense. You have just declared hits. It must be created before using it. The second error should disapper if you add throws declaration or try/catch block. By the wa