lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dr. Lothar Simon" <>
Subject How to count number of entries
Date Tue, 15 Oct 2002 06:50:02 GMT
I want to write a function countIndexEntries(key) to find out how many
entries are there in the index database for a key. I read the faq entry
about counting number of hits, but somehow it doesnt work as expected,
please help:

I create entries with

I try to count the number of entries for a key with
		Query query = QueryParser.parse(key, FULLTEXT_KEY_FIELD, analyzer);
		count =;

to find out if something is not yet indexed (count=0), already indexed
(count=1), or index is inconsistent (count=2). But count is always = 0 :-(

What is wrong or how to acchieve my goal with a different approach? Help is


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

View raw message