lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalin Shekhar Mangar <shalinman...@gmail.com>
Subject Re: init parameters for queryParser
Date Wed, 30 Sep 2009 14:40:12 GMT
On Wed, Sep 30, 2009 at 7:14 PM, Jérôme Etévé <jerome.eteve@gmail.com>wrote:

> Hi all,
>
>  I've got my own query parser plugin defined thanks to the queryParser tag:
>
> <queryParser name="myqueryparser" class="my.package.MyQueryParserPlugin" />
>
> The QParserPlugin class has got an init method like this:
> public void init(NamedList args);
>
> Where and how do I put my args to be passed to init for my query parser
> plugin?
>
> I'm trying
>
> <queryParser name="myqueryparser" class="my.package.MyQueryParserPlugin" >
> <lst name="defaults">
>  <str name="param1">value1</str>
>   <str name="param1">value1</str>
> </lst>
> </queryParser>
>
> But I'm not sure if it's the right way.
>
>
You don't need to put <lst name="defaults"> - defaults, appends, invariants
are keys used by RequestHandlers. Just put all the params you need directly:
<queryParser name="myqueryparser" class="my.package.MyQueryParserPlugin" >
  <str name="param1">value1</str>
  <bool name="param2">true</bool>
</queryParser>

-- 
Regards,
Shalin Shekhar Mangar.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message