lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allahbaksh Mohammedali Asadullah <Allahbaksh_Asadul...@infosys.com>
Subject RE: Getting Payload from Hits
Date Tue, 12 Feb 2008 06:57:08 GMT
Hi,
Karl thanks for the reply. But I am not able follow you. Should I extend Query class and How
should I get matching term. Can you please elaborate on it.
Regards,
Allahbakhs




-----Original Message-----
From: Karl Wettin [mailto:karl.wettin@gmail.com]
Sent: Monday, February 11, 2008 9:53 PM
To: java-user@lucene.apache.org
Subject: Re: Getting Payload from Hits

You would have to collect the payloads from matching terms by
extending a query.

See this recent thread:
http://www.nabble.com/Faceting-with-payloads-td15322956.html#a15322956

Are you sure this is what you want to do? What is it you store in the
payloads, and how do you plan to use this information once you have
retreived it?


    karl

11 feb 2008 kl. 16.51 skrev Allahbaksh Mohammedali Asadullah:

>
> 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:karl.wettin@gmail.com]
> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> **************** 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
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