Matt,
I'm not sure if this will help - but pull your definition of
MLTRubyWriter outside of MLTRubyResponseWriter (look at
RubyResponseWriter.java for hot is done there). RubyWriter isn't
public, but you're using the same package so it should work.
Also, of course you know this, but extending the response writers for
this sort of thing is not really the way to go. What needs to happen
is the MoreLikeThisComponent should be adjusted to have a way to
override the default field list from fl. If you build it this way,
it'd be something we could add to Solr and support in the core, versus
your unsupported rogue way :)
Erik
On Dec 17, 2009, at 10:13 AM, Matt Mitchell wrote:
Hi,
I'm pretty new solr internals, but have been experimenting with good
results... up to now!
What I'm trying to do is make it possible for the mlt docs to have
their own
custom fl, separate from the main docs fl. I'm only interested in
the ruby
response at this point. So the only way I've found to do this is to
create a
new query response writer, which extends the ruby response writer
and make a
few changes:
http://gist.github.com/258797
This class compiles fine. I put my "mlt-ruby-response-writer.jar"
within my
solr-home/lib dir, and registered the response writer. Solr starts up
without errors.
... but when I run it within Solr I get an error:
class org.apache.solr.request.MLTRubyResponseWriter$MLTRubyWriter
cannot access its superclass org.apache.solr.request.RubyWriter
java.lang.IllegalAccessError: class
org.apache.solr.request.MLTRubyResponseWriter$MLTRubyWriter cannot
access its superclass org.apache.solr.request.RubyWriter
Anyone have an idea to what I might be doing wrong? Why would I be
able to
compile, but then get a runtime error like that? Is this a classpath
thing?
Oh, the error occurs when I make a request and specify the wt, which
I named
"mltrb".
Thanks,
Matt