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 Fabiano Nunes <fa...@nunes.me> on 2010/11/29 20:49:31 UTC

Custom token attributes and payload. XML analyzing.

Hello,

I'm trying to store some token attributes found in a XML document.
More specifically, token coordinates for future highlighting.
Example: I have a XML with this structure:

<word c="184,108,292,11">Lucene</word>
<word c="306,21,292,11">in</word>
<word c="340,74,292,11">Action</word>
<word c="428,11,292,11">2nd</word>
<word c="453,23,292,11">Edition</word>

I want to store the @c attribute from word element (coordinates
left,width,top,height) in each token. So, in the search, I'll retrieve each
token position for highlighting. There is any good approach to do this?

Re: Custom token attributes and payload. XML analyzing.

Posted by Erick Erickson <er...@gmail.com>.
Sounds like payloads, have you investigated them? Here's a place
to start:
http://www.lucidimagination.com/blog/2009/08/05/getting-started-with-payloads/

<http://www.lucidimagination.com/blog/2009/08/05/getting-started-with-payloads/>
Best
Erick

On Mon, Nov 29, 2010 at 2:49 PM, Fabiano Nunes <fa...@nunes.me> wrote:

> Hello,
>
> I'm trying to store some token attributes found in a XML document.
> More specifically, token coordinates for future highlighting.
> Example: I have a XML with this structure:
>
> <word c="184,108,292,11">Lucene</word>
> <word c="306,21,292,11">in</word>
> <word c="340,74,292,11">Action</word>
> <word c="428,11,292,11">2nd</word>
> <word c="453,23,292,11">Edition</word>
>
> I want to store the @c attribute from word element (coordinates
> left,width,top,height) in each token. So, in the search, I'll retrieve each
> token position for highlighting. There is any good approach to do this?
>