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 Lior Barnea <Ba...@3i-mind.com> on 2011/09/04 09:45:53 UTC
Custom tokens creation in Lucene/Solr
Hi all,
I want to add user created tokens to a text field at index time, I want to pass some metadata to a custom filter I wrote that adds tokens to the tokenstream.
I tried to add the metadata to the text and strip it with a custom tokenizer but I didn't find a good way to pass it to my filter (which has to run last, cause I don't want and other filters working on my custom tokens).
(Working with Lucene 3.0.3 / Solr 3.3.0)
Any ideas ?
Best regards,
Lior Barnea,
3i-MIND.
RE: Custom tokens creation in Lucene/Solr
Posted by Lior Barnea <Ba...@3i-mind.com>.
I can add the metadata to a token's payload BUT there is not guarantee that other filters wont mess/delete the payload or the token itself in the analyzer chain...
-----Original Message-----
From: Saar Carmi [mailto:saarcarmi@gmail.com]
Sent: Sunday, September 04, 2011 5:00 PM
To: java-user@lucene.apache.org
Subject: Re: Custom tokens creation in Lucene/Solr
Have you tried to look at Payloads ?
Saar
On Sun, Sep 4, 2011 at 10:45 AM, Lior Barnea <Ba...@3i-mind.com> wrote:
> Hi all,
>
> I want to add user created tokens to a text field at index time, I
> want to pass some metadata to a custom filter I wrote that adds tokens
> to the tokenstream.
>
> I tried to add the metadata to the text and strip it with a custom
> tokenizer but I didn't find a good way to pass it to my filter (which
> has to run last, cause I don't want and other filters working on my custom tokens).
>
> (Working with Lucene 3.0.3 / Solr 3.3.0)
>
> Any ideas ?
>
> Best regards,
> Lior Barnea,
> 3i-MIND.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Custom tokens creation in Lucene/Solr
Posted by Saar Carmi <sa...@gmail.com>.
Have you tried to look at Payloads ?
Saar
On Sun, Sep 4, 2011 at 10:45 AM, Lior Barnea <Ba...@3i-mind.com> wrote:
> Hi all,
>
> I want to add user created tokens to a text field at index time, I want to
> pass some metadata to a custom filter I wrote that adds tokens to the
> tokenstream.
>
> I tried to add the metadata to the text and strip it with a custom
> tokenizer but I didn't find a good way to pass it to my filter (which has to
> run last, cause I don't want and other filters working on my custom tokens).
>
> (Working with Lucene 3.0.3 / Solr 3.3.0)
>
> Any ideas ?
>
> Best regards,
> Lior Barnea,
> 3i-MIND.
>