lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wettin <karl.wet...@gmail.com>
Subject Re: Getting Payload from Hits
Date Mon, 11 Feb 2008 15:22:27 GMT

11 feb 2008 kl. 14.46 skrev Allahbaksh Mohammedali Asadullah:

> d.add(new Field("f1", "This field has no payloads", Field.Store.NO,  
> Field.Index.TOKENIZED));
> d.add(new Field("f2", "This field has payloads in all docs",  
> Field.Store.YES, Field.Index.TOKENIZED));

> Document doc = hits.doc(i);
>
> Here I want to get the value of payload for the field..

Are you confusing payloads with stored field values?

You retreive the /stored field value/ like this:

doc.get("f2");

You "can not" retreive /payloads/ from Hits.



    karl

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message