lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lothar Simon" <>
Subject Determine number of entries for a certain key
Date Thu, 20 Jun 2002 15:50:17 GMT
What is the easiest way to determine the number of (not deleted) terms in an
(not optimized) index when the KEY string is known? Each indexed document
has a KEY and a CONTENTS field. One of my approaches was:

    Searcher searcher = new IndexSearcher(this.indexworkdir);
    Query query = QueryParser.parse(key, FULLTEXT_KEY_FIELD, analyzer);
    int count =;

This does not find anything: for existing keys always count=0 (though
searches in the CONTENTS field work perfectly). In addition, I tried
IndexReader and TermDocs, then IndexReader and docFreq... No success.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message