Hello,
I have a Tokenizer that generates a Payload, and a TokenFilter that uses it.
These work well with Solr 1.4.0 (therefore Lucene 2.9.1?), but when
I switched to the trunk version (I rebuilt the Tokenizer and TokenFilter
using the Lucene jar from the trunk and ran it), I encountered with
this error:
java.lang.IllegalArgumentException: This AttributeSource does not have the
attribute 'org.apache.lucene.analysis.tokenattributes.PayloadAttribute'.
This exception comes from this line in the TokenFilter code:
payloadAtt = (PayloadAttribute) getAttribute(PayloadAttribute.class);
The payload is created in the Tokenizer's constructor like this:
payloadAtt = (PayloadAttribute) addAttribute(PayloadAttribute.class);
When I only has the Tokenizer, the Solr admin shows the Payloads, so
I am pretty sure that Payloads are there, but the TokenFilter is
having trouble getting it.
I think there is a very subtle change between the trunk version
and Lucene 2.9.1 (or more likely 3.0.1 guessing from other indirect
evidences) that is causing this. Has anyone encountered
a similar problem?
----
Teruhiko "Kuro" Kurosaka
RLP + Lucene & Solr = powerful search for global contents
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]