On 9/27/2013 1:35 PM, Jack Krupansky wrote:
You forgot the qt=<custom-request-handler> parameter, such as on the wiki:
http://localhost:8983/solr/select/?&qt=tvrh&q=includes:[* TO *]&fl=id
And you need the custom request handler, such as on the wiki:
<requestHandler name="tvrh"
class="org.apache.solr.handler.component.SearchHandler">
<lst name="defaults">
<bool name="tv">true</bool>
</lst>
<arr name="last-components">
<str>tvComponent</str>
</arr>
</requestHandler>
You can add that "last-components" list to your default handler, if you
wish.
I have more detailed examples in my e-book.
That wiki page probably needs to be updated to have a /tvrh handler
instead of tvrh, and with /tvrh instead of /select. The 'qt' route is
the old way of doing things, before handleSelect="false" became the
accepted best practice.
In order to help the sender, I've been trying to get this working on my
dev server (running 4.4.0) and keep running into NullPointerException
problems. I think there's something important that I'm missing about
how to use the component. Here's an example of what my URL and request
handler are using:
http://server:port/solr/core/tv?q=id:someId&tv.fl=catchall
<requestHandler name="/tv" class="solr.SearchHandler" startup="lazy">
<lst name="defaults">
<bool name="tv">true</bool>
</lst>
<arr name="components">
<str>tvComponent</str>
</arr>
</requestHandler>
java.lang.NullPointerException at
org.apache.solr.handler.component.TermVectorComponent.process(TermVectorComponent.java:251)
Thanks,
Shawn