lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi" <r...@htinc.com>
Subject RE: No of docs using IndexSearcher
Date Fri, 10 Dec 2004 20:42:08 GMT
I'm fairly new to lucene.  The main reason why I did n't use the
IndexReader constructor for the searcher is we organize the indexes as
different partitions depending on document's date and during searching I
instantiate a MultiSearcher object on these different partitions
depending on from-date and to-date from the search. I was getting a
runtime exception during search, If the index does not have any
documents. That's why I was looking for some method on the searcher
object that gives me the number of documents. 

Thanks
Ravi


-----Original Message-----
From: amigo@max3d.com [mailto:amigo@max3d.com] 
Sent: Friday, December 10, 2004 3:25 PM
To: Lucene Users List
Subject: Re: No of docs using IndexSearcher

If your index is open shouldnt there be an instance of IndexReader
already there?


Ravi said the following on 12/10/2004 3:13 PM:

>I already have a field with a constant value in my index. How about
>using IndexSearcher.docFreq(new Term(field,value))? Then I don't have
to
>instantiate IndexReader. 
>
>-----Original Message-----
>From: amigo@max3d.com [mailto:amigo@max3d.com] 
>Sent: Friday, December 10, 2004 2:59 PM
>To: Lucene Users List
>Subject: Re: No of docs using IndexSearcher
>
>numDocs()
>
>http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/index/Index
R
>eader.html#numDocs()
>
>
>
>Ravi said the following on 12/10/2004 2:42 PM:
>
>  
>
>>How do I get the number of docs in an index If I just have access to a
>>    
>>
>
>  
>
>>searcher on that index?
>>
>>Thanks in advance
>>Ravi.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>>
>>
>>
>> 
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message