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 bbarani <bb...@gmail.com> on 2014/09/03 19:38:32 UTC
How to change search component parameters dynamically using query
Hi,
I use the below highlight search component in one of my request handler.
I am trying to figure out a way to change the value of highlight search
component dynamically from the query. Is it possible to modify the
parameters dynamically using the query (without creating another
searchcomponent)?
<searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<boundaryScanner class="solr.highlight.SimpleBoundaryScanner"
default="false" name="simple">
<lst name="defaults">
<str name="hl.bs.maxScan">200</str>
<str name="hl.bs.chars">.</str>
</lst>
</boundaryScanner>
<boundaryScanner class="solr.highlight.BreakIteratorBoundaryScanner"
default="true" name="breakIterator">
<lst name="defaults">
<str name="hl.bs.type">SENTENCE</str>
<str name="hl.bs.language">en</str>
<str name="hl.bs.country">US</str>
</lst>
</boundaryScanner>
</highlighting>
--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-change-search-component-parameters-dynamically-using-query-tp4156672.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to change search component parameters dynamically using query
Posted by Erick Erickson <er...@gmail.com>.
Depends on which ones. Any parameter in the "defaults" sections
can be overridden on dynamically, i.e.
.....&hl.bs.language=fr
Best,
Erick
On Wed, Sep 3, 2014 at 10:38 AM, bbarani <bb...@gmail.com> wrote:
> Hi,
>
> I use the below highlight search component in one of my request handler.
>
> I am trying to figure out a way to change the value of highlight search
> component dynamically from the query. Is it possible to modify the
> parameters dynamically using the query (without creating another
> searchcomponent)?
>
>
> <searchComponent class="solr.HighlightComponent" name="highlight">
> <highlighting>
> <boundaryScanner class="solr.highlight.SimpleBoundaryScanner"
> default="false" name="simple">
> <lst name="defaults">
> <str name="hl.bs.maxScan">200</str>
> <str name="hl.bs.chars">.</str>
> </lst>
> </boundaryScanner>
> <boundaryScanner class="solr.highlight.BreakIteratorBoundaryScanner"
> default="true" name="breakIterator">
> <lst name="defaults">
> <str name="hl.bs.type">SENTENCE</str>
> <str name="hl.bs.language">en</str>
> <str name="hl.bs.country">US</str>
> </lst>
> </boundaryScanner>
> </highlighting>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/How-to-change-search-component-parameters-dynamically-using-query-tp4156672.html
> Sent from the Solr - User mailing list archive at Nabble.com.