Hi,
Thanks for the reply. But is there any way that from the search result I can 
get Payload.

See my requirement is when user search for some field I want to display also 
additional data which is stored as Payload.

Regards,
Allahbaksh




-----Original Message-----
From: Karl Wettin [mailto:[EMAIL PROTECTED]
Sent: Monday, February 11, 2008 8:52 PM
To: java-user@lucene.apache.org
Subject: Re: Getting Payload from Hits


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to