You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Jan Høydahl / Cominvent <ja...@cominvent.com> on 2010/12/15 18:47:36 UTC

QParserPlugin as jar?

Hi,

I tried to package the edismax QParser (SOLR-1553) as a .jar file for inclusion in an already installed solr1.4.1, and dropped my new jar in SOLR_HOME/lib.
However it failed with an exception. It suspect because the patch modifies o.a.s.s.QParserPlugin, which is already existing on the classpath.

Is there a way to dynamically initialize new plugins without statically updating the QParserPlugin class?

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: QParserPlugin as jar?

Posted by Jan Høydahl / Cominvent <ja...@cominvent.com>.
That was how I expected it to work (and yes, I registered it in solrconfig.xml).
Wonder why it did not work when I tested it, I had to apply the patch and recompile. Guess I'll have to give it another try.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

On 15. des. 2010, at 19.19, Erik Hatcher wrote:

> 
> On Dec 15, 2010, at 12:47 , Jan Høydahl / Cominvent wrote:
> 
>> Hi,
>> 
>> I tried to package the edismax QParser (SOLR-1553) as a .jar file for inclusion in an already installed solr1.4.1, and dropped my new jar in SOLR_HOME/lib.
>> However it failed with an exception. It suspect because the patch modifies o.a.s.s.QParserPlugin, which is already existing on the classpath.
>> 
>> Is there a way to dynamically initialize new plugins without statically updating the QParserPlugin class?
> 
> Yes, you can simply register it in solrconfig.xml:
> 
>  <queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
> 
> The QParserPlugin statically registered qparsers are just convenience so those come "built-in" as registered (though can be overridden by registering a different class with the same name).
> 
> 	Erik
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: QParserPlugin as jar?

Posted by Erik Hatcher <er...@gmail.com>.
On Dec 15, 2010, at 12:47 , Jan Høydahl / Cominvent wrote:

> Hi,
> 
> I tried to package the edismax QParser (SOLR-1553) as a .jar file for inclusion in an already installed solr1.4.1, and dropped my new jar in SOLR_HOME/lib.
> However it failed with an exception. It suspect because the patch modifies o.a.s.s.QParserPlugin, which is already existing on the classpath.
> 
> Is there a way to dynamically initialize new plugins without statically updating the QParserPlugin class?

Yes, you can simply register it in solrconfig.xml:

  <queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>

The QParserPlugin statically registered qparsers are just convenience so those come "built-in" as registered (though can be overridden by registering a different class with the same name).

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org