How to register a custom QParserPlugin

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to register a custom QParserPlugin

oobenland
Hi,

we are trying to implement a custom QParserPlugin following this tutorial: http://spykem.blogspot.de/2013/06/plug-in-external-score-to-solr.html. We are using SOLR with VuFind. The implementation is done, the jar is located at vufind/solr/lib/ where other jars seem to be located. Then we added this snippet <queryparser class="ower.impl.MyQParserPlugin" name="myparser" /> to vufind/solr/biblio/conf/sorconfig.xml.

The SOLR admin console displays:

        <lst name="error">
          <str name="msg">Unknown query parser 'myparser'</str>
          <int name="code">400</int>
        </lst>

after requesting {!myparser}ower_field:1234567.

What are we doing wrong?

Any help, tips, etc. will be greatly appreciated.

Thank you!
Oliver
Reply | Threaded
Open this post in threaded view
|

Re: How to register a custom QParserPlugin

Chris Hostetter-3

: snippet <queryparser class="ower.impl.MyQParserPlugin" name="myparser" /> to
: vufind/solr/biblio/conf/sorconfig.xml.

the correct syntax should be...

  <queryParser class="ower.impl.MyQParserPlugin" name="myparser" />

...note the "P"

If it's loaded properly, you should see mention of MyQParserPlugin in your
logs at startup, and it should appear in the list of query parser plugins
in the admin ui...

https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=32604180



-Hoss
http://www.lucidworks.com/
Reply | Threaded
Open this post in threaded view
|

Re: How to register a custom QParserPlugin

oobenland
Hi Hoss,

thank you for your help. This helps a lot. I can see the plugin neither in the log nor in the plugin list, but it "works" now (got an exception from our class, so I know it'll be called).

Thanks a lot!
Oliver

Am 29.04.2015 um 18:40 schrieb Chris Hostetter:

>
> : snippet <queryparser class="ower.impl.MyQParserPlugin" name="myparser" /> to
> : vufind/solr/biblio/conf/sorconfig.xml.
>
> the correct syntax should be...
>
>    <queryParser class="ower.impl.MyQParserPlugin" name="myparser" />
>
> ...note the "P"
>
> If it's loaded properly, you should see mention of MyQParserPlugin in your
> logs at startup, and it should appear in the list of query parser plugins
> in the admin ui...
>
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=32604180
>
>
>
> -Hoss
> http://www.lucidworks.com/
>