lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Brun <>
Subject How to navigate through indexed terms
Date Wed, 25 May 2005 08:01:08 GMT

I am currently looking for a way to navigate forward and backward among 
the indexed terms.
For example, given a Term t, I would like to be able to get the next 10 
terms or the previous 10 ones.

Getting the next terms is quite straitforward, using the terms(Term t) 
method from IndexReader. The problem arises when I try to get the 
previous terms. Since the TermEnum returned by IndexReader.terms(t) only 
has a next() method, I had to get all the terms from the index and 
iterate through them up to the given term. It it not a good method and 
it will probably be very slow whith big indexes...

Has anyone ran through this problem yet?


                Antoine  Brun

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

View raw message