lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: How to get Solr Unique Key while doing TermEnum
Date Fri, 30 Nov 2007 14:36:32 GMT
It takes a bit of memory, but you could use the FieldCache for this.

-Yonik

On Nov 30, 2007 6:19 AM, Bharani <bharani_vms@yahoo.com> wrote:
>
> Hi,
>
> In order to extract the Term Dictionary of the indexed document i am doing
> this
>
> IndexReader indexReader = IndexReader.open(indexDir);
>             terms = indexReader.terms(new Term("description_t", ""));
>             while (terms.next()){
>                     if("description_t".equals(terms.term().field())){
>                         MultipleTermPositions mt=new MultipleTermPositions(indexReader,new
> Term[]{terms.term()});
>                         while(mt.next()){
>                                 System.out.println("Document Id="+mt.doc()+" for
> term="+terms.term().text() + " Frequency "+mt.freq());
>                         }
>                     }
>             }
> This gives me the document id of lucene but i would like to get the Solr
> Unique Id. Is there an api that would give me the id without loading the
> entire document?
>
> Thanks
> Bharani
> --
> View this message in context: http://www.nabble.com/How-to-get-Solr-Unique-Key-while-doing-TermEnum-tf4902164.html#a14042468
> Sent from the Solr - Dev mailing list archive at Nabble.com.
>
>

Mime
View raw message