Thank you, but I think I didn't explained my problem clearly enough.

I have four positions (top, bottom, right and left) for each one of the
words of the document so I would have to store in the index the content of
the page with the positions in the middle.

org.apache.lucene.document.Field#UnIndexed("content", "house 1142 1231 3212
2214 dog 2213 2432 3214 2134 ...")

In order to get the values after a search I would need to parse the document
returned to find the positions that are next to the searched word. I have
seen that the class Token has 4 properties: beginColumn, beginLine,
endColumn and endLine and I don't know if it is possible to use them to
store for each token the position that I want.

I think this approach is not the correct one so any help on this would be
appreciated.


Olaia.

-----Mensaje original-----
De: Stephane James Vaucher [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 27 de abril de 2004 21:46
Para: Lucene Users List
Asunto: Re: Re-associate a token with its source

When indexing, use UnIndexed fields to store this data in your document.

org.apache.lucene.document.Field#UnIndexed(String name, String value) 

Add the fields using:
org.apache.lucene.document.Document.add(Field)

After your search, you can get the field value from:
Document Hits.doc(int)

You can retrieve your store values using 
String Document.get(String name) 

HTH,
sv

On Tue, 27 Apr 2004, Olaia Vázquez Sánchez wrote:

> Hello
> 
>  
> 
> I have documents in XML in which, for each word, I have 4 positions (top,
> down, left and right) that would let me to highlight this word in a jpg
> image. I want to index this XML documents and to highlight the results of
> the queries in the image, so I need to store this positions for each word
> inside the index.
> 
>  
> 
> I was searching about how can I use the Token fields to store this
> attributes but I didn’t found any example where this fields were used.
> 
>  
> 
> Thanks,
> 
>  
> 
> Olaia Vázquez
> 
> 


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


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

Reply via email to