lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Hermann <>
Subject Re: Copying Payload from one Token to the next
Date Sun, 17 Oct 2010 18:02:58 GMT
Am Sonntag, 17. Oktober 2010, 19:35:33 schrieb Ahmet Arslan:


> > how can i copy the Payload from the current token to the
> > following token in a
> > TokenFilter?

> (that can peek n tokens
> ahead in the buffered input stream, without modifying the stream) and
> may help.

Thanks for the hint i'll have a look if that allows me to improve my solution.

Anyway i found out what my problem was: For every Field() a "fresh" Analyzer 
is used (makes sense, since it allows to use a different Analyzer for every 
field). So that was the reason i could not transfer the Payload using a member 
variable in the Tokenfilter.

My current solution is to concatenate the Field() contents before adding a 
Field() to the document. This way i can pass the payload from one token to the 
next. That also solved my problem with scorePayload earlier, since now every 
token has its payload.

Christoph Hermann

Christoph Hermann
Institut für Informatik
Tel: +49 761-203-8171 Fax: +49 761-203-8162

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message