You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Markus Boese <ma...@gmail.com> on 2016/08/09 10:04:34 UTC

Custom SearchHandler with custom QueryResponseWriter

Hello everyone,
I'm trying use my QueryResponseWriter with my SearchHandler, but the
write(...)-Method of my QueryResponseWriter is not called.

Excerpt of my sorlconfig.xml:

    <queryResponseWriter name="wwWriter" class="my.writer.WWResponseWriter"
/>

    <searchComponent name="wwSearcher"
class="my.search.component.WWSearchComponent" />

    <requestHandler name="/ww" class="solr.SearchHandler">
        <lst name="defaults">
            <str name="wt">wwWriter</str>
            <str name="df">ww_search_key</str>
            <str name="rows">10</str>
        </lst>
        <arr name="last-components">
            <str>wwSearcher</str>
        </arr>
    </requestHandler>

Could anyone explain why a request to "/ww" not includes a call of
WWResponseWriter?
I just want to render custom Json aus output.

-- 
Greetz,

Markus Boese

Re: Custom SearchHandler with custom QueryResponseWriter

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Where did you put the jar that contains those custom classes? Perhaps
they are not being loaded. Is there an error message in the logs?

Are you doing this in standalone Solr or in a cloud-mode?

Regards,
   Alex.
----
Newsletter and resources for Solr beginners and intermediates:
http://www.solr-start.com/


On 9 August 2016 at 20:04, Markus Boese <ma...@gmail.com> wrote:
> Hello everyone,
> I'm trying use my QueryResponseWriter with my SearchHandler, but the
> write(...)-Method of my QueryResponseWriter is not called.
>
> Excerpt of my sorlconfig.xml:
>
>     <queryResponseWriter name="wwWriter" class="my.writer.WWResponseWriter"
> />
>
>     <searchComponent name="wwSearcher"
> class="my.search.component.WWSearchComponent" />
>
>     <requestHandler name="/ww" class="solr.SearchHandler">
>         <lst name="defaults">
>             <str name="wt">wwWriter</str>
>             <str name="df">ww_search_key</str>
>             <str name="rows">10</str>
>         </lst>
>         <arr name="last-components">
>             <str>wwSearcher</str>
>         </arr>
>     </requestHandler>
>
> Could anyone explain why a request to "/ww" not includes a call of
> WWResponseWriter?
> I just want to render custom Json aus output.
>
> --
> Greetz,
>
> Markus Boese