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 Ahson Iqbal <mi...@yahoo.com> on 2011/01/21 08:24:37 UTC

Integrating Surround Query Parser

Hi All

I want to integrate Surround Query Parser with solr, To do this i have 
downloaded jar file from the internet and and then pasting that jar file in 
web-inf/lib 

and configured query parser in solrconfig.xml as 
<queryParser name="SurroundQParser" 
class="org.apache.lucene.queryParser.surround.parser.QueryParser"/>

now when i load solr admin page following exception comes
org.apache.solr.common.SolrException: Error Instantiating QParserPlugin,  
org.apache.lucene.queryParser.surround.parser.QueryParser is not a  
org.apache.solr.search.QParserPlugin

what i think that i didnt get the right plugin, can any body guide me from where 
to get right plugin for surround query parser or how to accurately integrate 
this plugin with solr. 


thanx
Ahsan



      

Re: Integrating Surround Query Parser

Posted by Rahul Mehta <ra...@gmail.com>.
Okay, thanks for reply.

On Thu, Nov 24, 2011 at 2:35 PM, Erik Hatcher <er...@gmail.com>wrote:

>
> On Nov 23, 2011, at 09:56 , Ahmet Arslan wrote:
>
> >
> >> is this is the trunk of solr 4.0 ,
> >> can't i implement in solr 3.1 .?
> >
> > Author of the patch would know answer to this. But why not use trunk?
>
> I spent a fair bit of time yesterday on making a 3.x compatible patch but
> have not completed that work yet.  It's a bit more work because of the
> dependency in the build system.   I may not be able to get back to this for
> some weeks yet.  The SurroundQParserPlugin is really all you need to make
> this work, just need to get the compilation bit fixed (as things changed
> from 3.x to trunk with contrib/modules).
>
> Rahul - if you'd like to see this done, feel free to take a stab at it.
>  I'll tinker with it as I have time.
>
>        Erik
>
>


-- 
Thanks & Regards

Rahul Mehta

Re: Integrating Surround Query Parser

Posted by Erik Hatcher <er...@gmail.com>.
On Nov 23, 2011, at 09:56 , Ahmet Arslan wrote:

> 
>> is this is the trunk of solr 4.0 ,
>> can't i implement in solr 3.1 .?
> 
> Author of the patch would know answer to this. But why not use trunk?

I spent a fair bit of time yesterday on making a 3.x compatible patch but have not completed that work yet.  It's a bit more work because of the dependency in the build system.   I may not be able to get back to this for some weeks yet.  The SurroundQParserPlugin is really all you need to make this work, just need to get the compilation bit fixed (as things changed from 3.x to trunk with contrib/modules). 

Rahul - if you'd like to see this done, feel free to take a stab at it.  I'll tinker with it as I have time.

	Erik


Re: Integrating Surround Query Parser

Posted by Ahmet Arslan <io...@yahoo.com>.
> is this is the trunk of solr 4.0 ,
> can't i implement in solr 3.1 .?

Author of the patch would know answer to this. But why not use trunk?

Re: Integrating Surround Query Parser

Posted by Rahul Mehta <ra...@gmail.com>.
is this is the trunk of solr 4.0 , can't i implement in solr 3.1 .?

On Wed, Nov 23, 2011 at 7:23 PM, Ahmet Arslan <io...@yahoo.com> wrote:

> > After this i tried with solr3.1-src.
> > Please suggest what should i do ?
>
> Please use solr-trunk.
> svn checkout http://svn.apache.org/repos/asf/lucene/dev/trunk
>



-- 
Thanks & Regards

Rahul Mehta

Re: Integrating Surround Query Parser

Posted by Ahmet Arslan <io...@yahoo.com>.
> After this i tried with solr3.1-src.
> Please suggest what should i do ?

Please use solr-trunk.
svn checkout http://svn.apache.org/repos/asf/lucene/dev/trunk

Re: Integrating Surround Query Parser

Posted by Rahul Mehta <ra...@gmail.com>.
After this i tried with solr3.1-src.


   - and this time i got the core folder in the previous installation ,when
   this folder get created
   - /home/reach121/basf/*apache-solr-3.1.0/core/src/test/org/apache/solr/search/TestSurroundQueryParser.java
   *
   - and i have putted * <queryParser name="surround"
   class="org.apache.solr.search.SurroundQParserPlugin" />*
   - but when i run solr , it is giving me an error :
   -
   - SEVERE: org.apache.solr.common.SolrException: Error loading class
   'org.apache.solr.search.SurroundQParserPlugin'
   -         at
   org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:389)
   -         at
   org.apache.solr.core.SolrCore.createInstance(SolrCore.java:423)
   -         at
   org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:445)
   -         at
   org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1545)
   -         at
   org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1539)
   -         at
   org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1572)
   -         at
   org.apache.solr.core.SolrCore.initQParsers(SolrCore.java:1489)
   -         at org.apache.solr.core.SolrCore.<init>(SolrCore.java:555)
   -         at
   org.apache.solr.core.CoreContainer.create(CoreContainer.java:458)
   -         at
   org.apache.solr.core.CoreContainer.load(CoreContainer.java:316)
   -         at
   org.apache.solr.core.CoreContainer.load(CoreContainer.java:207)
   -         at
   org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:130)
   -         at
   org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94)
   -         at
   org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
   -         at
   org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
   -         at
   org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
   -

Please suggest what should i do ?

On Wed, Nov 23, 2011 at 11:19 AM, Rahul Mehta <ra...@gmail.com>wrote:

> This what i tried:
>
>
>    - Gone to  the solr 3.1 directory which is downloaded from here.
>    http://www.trieuvan.com/apache//lucene/solr/3.1.0/apache-solr-3.1.0.tgz
>    - wget
>    https://issues.apache.org/jira/secure/attachment/12493167/SOLR-2703.patch
>    - run the :  patch -p0 -i SOLR-2703.patch --dry-run
>    - got an error :
>       - patching file
>       core/src/test/org/apache/solr/search/TestSurroundQueryParser.java
>       - patching file core/src/test-files/solr/conf/schemasurround.xml
>       - patching file core/src/test-files/solr/conf/solrconfigsurround.xml
>       - patching file
>       core/src/java/org/apache/solr/search/SurroundQParserPlugin.java
>       - patching file example/solr/conf/solrconfig.xml
>       - Hunk #1 FAILED at 1538.
>       - 1 out of 1 hunk FAILED -- saving rejects to file
>       example/solr/conf/solrconfig.xml.rej
>    - our solr config file is getting end at 1508 only.
>    - tried finding sudo find / -name TestSurroundQueryParser.java  which
>    is not found in the directory .
>    - and when m doing svn up giving me Skipped '.'
>
> *Please suggest what should i do now ? *
>
> On Wed, Nov 23, 2011 at 10:39 AM, Rahul Mehta <ra...@gmail.com>wrote:
>
>> How to apply this patch https://issues.apache.org/jira/browse/SOLR-2703 with
>> solr 3.1 to install surround as plugin?
>>
>>
>> On Tue, Nov 22, 2011 at 7:34 PM, Erik Hatcher <er...@gmail.com>wrote:
>>
>>> The "surround" query parser is fully wired into Solr trunk/4.0, if that
>>> helps.  See http://wiki.apache.org/solr/SurroundQueryParser and the
>>> JIRA issue linked there in case you want to patch it into a different
>>> version.
>>>
>>>        Erik
>>>
>>> On Jan 21, 2011, at 02:24 , Ahson Iqbal wrote:
>>>
>>> > Hi All
>>> >
>>> > I want to integrate Surround Query Parser with solr, To do this i have
>>> > downloaded jar file from the internet and and then pasting that jar
>>> file in
>>> > web-inf/lib
>>> >
>>> > and configured query parser in solrconfig.xml as
>>> > <queryParser name="SurroundQParser"
>>> > class="org.apache.lucene.queryParser.surround.parser.QueryParser"/>
>>> >
>>> > now when i load solr admin page following exception comes
>>> > org.apache.solr.common.SolrException: Error Instantiating
>>> QParserPlugin,
>>> > org.apache.lucene.queryParser.surround.parser.QueryParser is not a
>>> > org.apache.solr.search.QParserPlugin
>>> >
>>> > what i think that i didnt get the right plugin, can any body guide me
>>> from where
>>> > to get right plugin for surround query parser or how to accurately
>>> integrate
>>> > this plugin with solr.
>>> >
>>> >
>>> > thanx
>>> > Ahsan
>>> >
>>> >
>>> >
>>>
>>>
>>
>>
>> --
>> Thanks & Regards
>>
>> Rahul Mehta
>>
>>
>>
>>
>
>
> --
> Thanks & Regards
>
> Rahul Mehta
>
>
>
>


-- 
Thanks & Regards

Rahul Mehta

Re: Integrating Surround Query Parser

Posted by Rahul Mehta <ra...@gmail.com>.
This what i tried:


   - Gone to  the solr 3.1 directory which is downloaded from here.
   http://www.trieuvan.com/apache//lucene/solr/3.1.0/apache-solr-3.1.0.tgz
   - wget
   https://issues.apache.org/jira/secure/attachment/12493167/SOLR-2703.patch
   - run the :  patch -p0 -i SOLR-2703.patch --dry-run
   - got an error :
      - patching file
      core/src/test/org/apache/solr/search/TestSurroundQueryParser.java
      - patching file core/src/test-files/solr/conf/schemasurround.xml
      - patching file core/src/test-files/solr/conf/solrconfigsurround.xml
      - patching file
      core/src/java/org/apache/solr/search/SurroundQParserPlugin.java
      - patching file example/solr/conf/solrconfig.xml
      - Hunk #1 FAILED at 1538.
      - 1 out of 1 hunk FAILED -- saving rejects to file
      example/solr/conf/solrconfig.xml.rej
   - our solr config file is getting end at 1508 only.
   - tried finding sudo find / -name TestSurroundQueryParser.java  which is
   not found in the directory .
   - and when m doing svn up giving me Skipped '.'

*Please suggest what should i do now ? *

On Wed, Nov 23, 2011 at 10:39 AM, Rahul Mehta <ra...@gmail.com>wrote:

> How to apply this patch https://issues.apache.org/jira/browse/SOLR-2703 with
> solr 3.1 to install surround as plugin?
>
>
> On Tue, Nov 22, 2011 at 7:34 PM, Erik Hatcher <er...@gmail.com>wrote:
>
>> The "surround" query parser is fully wired into Solr trunk/4.0, if that
>> helps.  See http://wiki.apache.org/solr/SurroundQueryParser and the JIRA
>> issue linked there in case you want to patch it into a different version.
>>
>>        Erik
>>
>> On Jan 21, 2011, at 02:24 , Ahson Iqbal wrote:
>>
>> > Hi All
>> >
>> > I want to integrate Surround Query Parser with solr, To do this i have
>> > downloaded jar file from the internet and and then pasting that jar
>> file in
>> > web-inf/lib
>> >
>> > and configured query parser in solrconfig.xml as
>> > <queryParser name="SurroundQParser"
>> > class="org.apache.lucene.queryParser.surround.parser.QueryParser"/>
>> >
>> > now when i load solr admin page following exception comes
>> > org.apache.solr.common.SolrException: Error Instantiating QParserPlugin,
>> > org.apache.lucene.queryParser.surround.parser.QueryParser is not a
>> > org.apache.solr.search.QParserPlugin
>> >
>> > what i think that i didnt get the right plugin, can any body guide me
>> from where
>> > to get right plugin for surround query parser or how to accurately
>> integrate
>> > this plugin with solr.
>> >
>> >
>> > thanx
>> > Ahsan
>> >
>> >
>> >
>>
>>
>
>
> --
> Thanks & Regards
>
> Rahul Mehta
>
>
>
>


-- 
Thanks & Regards

Rahul Mehta

Re: Integrating Surround Query Parser

Posted by Rahul Mehta <ra...@gmail.com>.
How to apply this patch https://issues.apache.org/jira/browse/SOLR-2703 with
solr 3.1 to install surround as plugin?

On Tue, Nov 22, 2011 at 7:34 PM, Erik Hatcher <er...@gmail.com>wrote:

> The "surround" query parser is fully wired into Solr trunk/4.0, if that
> helps.  See http://wiki.apache.org/solr/SurroundQueryParser and the JIRA
> issue linked there in case you want to patch it into a different version.
>
>        Erik
>
> On Jan 21, 2011, at 02:24 , Ahson Iqbal wrote:
>
> > Hi All
> >
> > I want to integrate Surround Query Parser with solr, To do this i have
> > downloaded jar file from the internet and and then pasting that jar file
> in
> > web-inf/lib
> >
> > and configured query parser in solrconfig.xml as
> > <queryParser name="SurroundQParser"
> > class="org.apache.lucene.queryParser.surround.parser.QueryParser"/>
> >
> > now when i load solr admin page following exception comes
> > org.apache.solr.common.SolrException: Error Instantiating QParserPlugin,
> > org.apache.lucene.queryParser.surround.parser.QueryParser is not a
> > org.apache.solr.search.QParserPlugin
> >
> > what i think that i didnt get the right plugin, can any body guide me
> from where
> > to get right plugin for surround query parser or how to accurately
> integrate
> > this plugin with solr.
> >
> >
> > thanx
> > Ahsan
> >
> >
> >
>
>


-- 
Thanks & Regards

Rahul Mehta

Re: Integrating Surround Query Parser

Posted by Erik Hatcher <er...@gmail.com>.
The "surround" query parser is fully wired into Solr trunk/4.0, if that helps.  See http://wiki.apache.org/solr/SurroundQueryParser and the JIRA issue linked there in case you want to patch it into a different version.

	Erik

On Jan 21, 2011, at 02:24 , Ahson Iqbal wrote:

> Hi All
> 
> I want to integrate Surround Query Parser with solr, To do this i have 
> downloaded jar file from the internet and and then pasting that jar file in 
> web-inf/lib 
> 
> and configured query parser in solrconfig.xml as 
> <queryParser name="SurroundQParser" 
> class="org.apache.lucene.queryParser.surround.parser.QueryParser"/>
> 
> now when i load solr admin page following exception comes
> org.apache.solr.common.SolrException: Error Instantiating QParserPlugin,  
> org.apache.lucene.queryParser.surround.parser.QueryParser is not a  
> org.apache.solr.search.QParserPlugin
> 
> what i think that i didnt get the right plugin, can any body guide me from where 
> to get right plugin for surround query parser or how to accurately integrate 
> this plugin with solr. 
> 
> 
> thanx
> Ahsan
> 
> 
> 


Re: Integrating Surround Query Parser

Posted by Dennis Gearon <ge...@sbcglobal.net>.
Sounds to me like you either have to find a way NOT to use a parser that is a 
child class of:

   org.apache.solr.search.QParserPlugin

(not sure if that's possible), or you have to find out what's wrong with the 
file. Where did you get it, have you talked to the author?

 Dennis Gearon


Signature Warning
----------------
It is always a good idea to learn from your own mistakes. It is usually a better 
idea to learn from others’ mistakes, so you do not have to make them yourself. 
from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036'


EARTH has a Right To Life,
otherwise we all die.



----- Original Message ----
From: Ahson Iqbal <mi...@yahoo.com>
To: Solr Send Mail <so...@lucene.apache.org>
Sent: Thu, January 20, 2011 11:24:37 PM
Subject: Integrating Surround Query Parser

Hi All

I want to integrate Surround Query Parser with solr, To do this i have 
downloaded jar file from the internet and and then pasting that jar file in 
web-inf/lib 

and configured query parser in solrconfig.xml as 
<queryParser name="SurroundQParser" 
class="org.apache.lucene.queryParser.surround.parser.QueryParser"/>

now when i load solr admin page following exception comes
org.apache.solr.common.SolrException: Error Instantiating QParserPlugin,  
org.apache.lucene.queryParser.surround.parser.QueryParser is not a  
org.apache.solr.search.QParserPlugin

what i think that i didnt get the right plugin, can any body guide me from where 

to get right plugin for surround query parser or how to accurately integrate 
this plugin with solr. 


thanx
Ahsan