You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Sahin Buyrukbilen <sa...@gmail.com> on 2010/09/30 20:24:31 UTC

how to get the first term from index?

Hi all,

I need to get the first term in my index and iterate it. Can anybody help
me?

Best.

Re: how to get the first term from index?

Posted by Sahin Buyrukbilen <sa...@gmail.com>.
Thank you Anshum, it seems to be working, I need to play with it.



On Thu, Sep 30, 2010 at 2:34 PM, Anshum <an...@gmail.com> wrote:

> Hi Sahin,
> Incase you intend to get an enumerator on the terms in an index, you could
> use the following call [indexreader.terms()] from IndexReader to get the
> enumerator on terms and just iterate.
>
>
> http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/index/IndexReader.html#terms()<http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/index/IndexReader.html#terms%28%29>
> Hope this is what you intended!
>
> --
> Anshum Gupta
> http://ai-cafe.blogspot.com
>
>
> On Thu, Sep 30, 2010 at 11:54 PM, Sahin Buyrukbilen <
> sahin.buyrukbilen@gmail.com> wrote:
>
> > Hi all,
> >
> > I need to get the first term in my index and iterate it. Can anybody help
> > me?
> >
> > Best.
> >
>

Re: how to get the first term from index?

Posted by Anshum <an...@gmail.com>.
Hi Sahin,
Incase you intend to get an enumerator on the terms in an index, you could
use the following call [indexreader.terms()] from IndexReader to get the
enumerator on terms and just iterate.

http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/index/IndexReader.html#terms()
Hope this is what you intended!

--
Anshum Gupta
http://ai-cafe.blogspot.com


On Thu, Sep 30, 2010 at 11:54 PM, Sahin Buyrukbilen <
sahin.buyrukbilen@gmail.com> wrote:

> Hi all,
>
> I need to get the first term in my index and iterate it. Can anybody help
> me?
>
> Best.
>