Re : Solr - Plugin : QParserPlugin is not working..

View: New views
4 Messages — Rating Filter:   Alert me  

Re : Solr - Plugin : QParserPlugin is not working..

by Phanindra Reva :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello All,
           I am a newbie, learning Solr - plugins concept. While
following the tutorials on the same from
http://wiki.apache.org/solr/SolrPlugins , I have tried to work on
Query Parser plugin concept by extending QParserPlugin class.
  I have registered my custom plugin class in solrconfig.xml using following ,

                     <queryParser name="queryParserPluginOne"
class="plugin.query.parser.QueryParserPluginOne"/>

and I have linked the same with default request handler by including
the following in solrconfig.xml.

                    <requestHandler name="requestHandlerPluginOne"
class="plugin.request.RequestTestOne" default="true" >
                         <lst name="defaults">
                                      <str name="defType">queryParserPluginOne</str>
                                </lst>
                   </requestHandler>

                  The implmentation is basic and which has some
System.out.println() s and addition of request params. To be brief, my
problem is I dont find any effect of the code thats included in my
custom Query Parser plugin class and its not part of the flow, but I
am sure that my custom request handler is part of the flow. I would be
glad if you solve my problem.
      Please dont mind, If I made some silly mistake.
Thanks in advance.

Re: Re : Solr - Plugin : QParserPlugin is not working..

by Grant Ingersoll-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 27, 2009, at 12:58 PM, Phanindra Reva wrote:

> Hello All,
>           I am a newbie, learning Solr - plugins concept. While
> following the tutorials on the same from
> http://wiki.apache.org/solr/SolrPlugins , I have tried to work on
> Query Parser plugin concept by extending QParserPlugin class.
>  I have registered my custom plugin class in solrconfig.xml using  
> following ,
>
>                     <queryParser name="queryParserPluginOne"
> class="plugin.query.parser.QueryParserPluginOne"/>
>
> and I have linked the same with default request handler by including
> the following in solrconfig.xml.
>
>                    <requestHandler name="requestHandlerPluginOne"
> class="plugin.request.RequestTestOne" default="true" >
>                        <lst name="defaults">
>                      <str name="defType">queryParserPluginOne</str>
>                        </lst>
>                   </requestHandler>
>
>                  The implmentation is basic and which has some
> System.out.println() s and addition of request params. To be brief, my
> problem is I dont find any effect of the code thats included in my
> custom Query Parser plugin class and its not part of the flow, but I
> am sure that my custom request handler is part of the flow. I would be
> glad if you solve my problem.

What's the URL you are sending to Solr that is invoking the req.  
handler?  Also, check your startup logs and make sure you code was  
loaded.  You should see some printout somewhere indicating as much.

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:
http://www.lucidimagination.com/search


Re: Re : Solr - Plugin : QParserPlugin is not working..

by Phanindra Reva :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
     I am not changing any URL while querying because the custom query
parser plugin is linked with the default request handler.You may have
a look at my first mail for xml snippets which is included in
solrconfig.xml .
      Yeah.. I found the line .. "INFO: created queryParserPluginOne:
plugin.query.parser.QueryParserPluginOne" in logs. I am sure that the
request handler with which this query parser plugin is linked is
working,Because I could find the results of System.out.println()s
(those included in requesthandler) in log, but not query parser
plugin's System.outs or other effects.

On Tue, Oct 27, 2009 at 9:13 PM, Grant Ingersoll <gsingers@...> wrote:

>
> On Oct 27, 2009, at 12:58 PM, Phanindra Reva wrote:
>
>> Hello All,
>>          I am a newbie, learning Solr - plugins concept. While
>> following the tutorials on the same from
>> http://wiki.apache.org/solr/SolrPlugins , I have tried to work on
>> Query Parser plugin concept by extending QParserPlugin class.
>>  I have registered my custom plugin class in solrconfig.xml using
>> following ,
>>
>>                    <queryParser name="queryParserPluginOne"
>> class="plugin.query.parser.QueryParserPluginOne"/>
>>
>> and I have linked the same with default request handler by including
>> the following in solrconfig.xml.
>>
>>                   <requestHandler name="requestHandlerPluginOne"
>> class="plugin.request.RequestTestOne" default="true" >
>>                                <lst name="defaults">
>>                                      <str
>> name="defType">queryParserPluginOne</str>
>>                                </lst>
>>                  </requestHandler>
>>
>>                 The implmentation is basic and which has some
>> System.out.println() s and addition of request params. To be brief, my
>> problem is I dont find any effect of the code thats included in my
>> custom Query Parser plugin class and its not part of the flow, but I
>> am sure that my custom request handler is part of the flow. I would be
>> glad if you solve my problem.
>
> What's the URL you are sending to Solr that is invoking the req. handler?
>  Also, check your startup logs and make sure you code was loaded.  You
> should see some printout somewhere indicating as much.
>
> --------------------------
> Grant Ingersoll
> http://www.lucidimagination.com/
>
> Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using
> Solr/Lucene:
> http://www.lucidimagination.com/search
>
>

Re: Re : Solr - Plugin : QParserPlugin is not working..

by hossman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


: plugin.query.parser.QueryParserPluginOne" in logs. I am sure that the
: request handler with which this query parser plugin is linked is
: working,Because I could find the results of System.out.println()s
: (those included in requesthandler) in log, but not query parser
: plugin's System.outs or other effects.

You're going to have to give us more info besudes just a solrconfig.xml
snippet to help you...

1) what does hte code for your custom plugin(s) look like?
2) exactly what URL are you hitting?
3) what does solr log when you hit that url?
4) what does your plugin(s) log when you hit that url?



-Hoss