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 Todd Benge <to...@gmail.com> on 2008/12/15 05:47:34 UTC
Payload Question
Hi,
I've been reading about payloads because I think we may be able to use
them to solve a problem we're having involving sorts.
>From the API, Payloads are set on Token classes. During indexing,
Fields are added to Documents so I think I'm missing the connection of
how the payloads are set into the index.
Any help is appreciated.
Thanks,
Todd
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Payload Question
Posted by David Causse <dc...@spotter.com>.
Hi,
After adding fields, those fields are analyzed and this is the step you
are looking for.
The payloads are stored on each Token, so you need your own Analyzer to
do so.
just use reusableToken.setPayload(myPayLoad) somewhere, look at already
existing analyzers.
In our case we use TokenStream and TokenFilters cause we have
pre-analyzed Tokens.
It's very simple to use, the old api is self-explanatory, but this API
seems in big move and methods are now deprecated and I couldn't
understand the new API.
David.
Todd Benge a écrit :
> Hi,
>
> I've been reading about payloads because I think we may be able to use
> them to solve a problem we're having involving sorts.
>
> >From the API, Payloads are set on Token classes. During indexing,
> Fields are added to Documents so I think I'm missing the connection of
> how the payloads are set into the index.
>
> Any help is appreciated.
>
> Thanks,
>
> Todd
>
> ---------------------------------------------------------------------
> 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
Re: Payload Question
Posted by Todd Benge <to...@gmail.com>.
Thanks for the help. I've been reading through some of the postings
so I'll look that one up.
Appreciate it.
Todd
On Mon, Dec 15, 2008 at 8:43 AM, Greg Shackles <gs...@gmail.com> wrote:
> Hey Todd,
>
> If you look for a thread I started a month or two ago, there was a pretty
> good discussion of payloads (it is where I initially learned about them).
> In that thread should also be an explanation of the solution I ended up
> using for implementing payloads, so maybe that would be helpful for you.
>
> - Greg
>
> On Sun, Dec 14, 2008 at 11:47 PM, Todd Benge <to...@gmail.com> wrote:
>
>> Hi,
>>
>> I've been reading about payloads because I think we may be able to use
>> them to solve a problem we're having involving sorts.
>>
>> From the API, Payloads are set on Token classes. During indexing,
>> Fields are added to Documents so I think I'm missing the connection of
>> how the payloads are set into the index.
>>
>> Any help is appreciated.
>>
>> Thanks,
>>
>> Todd
>>
>> ---------------------------------------------------------------------
>> 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
Re: Payload Question
Posted by Greg Shackles <gs...@gmail.com>.
Hey Todd,
If you look for a thread I started a month or two ago, there was a pretty
good discussion of payloads (it is where I initially learned about them).
In that thread should also be an explanation of the solution I ended up
using for implementing payloads, so maybe that would be helpful for you.
- Greg
On Sun, Dec 14, 2008 at 11:47 PM, Todd Benge <to...@gmail.com> wrote:
> Hi,
>
> I've been reading about payloads because I think we may be able to use
> them to solve a problem we're having involving sorts.
>
> From the API, Payloads are set on Token classes. During indexing,
> Fields are added to Documents so I think I'm missing the connection of
> how the payloads are set into the index.
>
> Any help is appreciated.
>
> Thanks,
>
> Todd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>