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 meghana <me...@amultek.com> on 2011/12/28 07:29:50 UTC

hl.boundaryScanner and hl.bs.chars

Hi all ,

i seen hl.boundaryScanner and hl.bs.chars parameters in solr highlighting
feature. but i didn't get its meaning exactly , what its use and how can i
use it in my search? 

My need is something like ,i want to set my fragment to start and end from
special character / string that i can specify and can set fragment length
dynamic (if possible) .

Can i do this by any way?? 
Meghana


--
View this message in context: http://lucene.472066.n3.nabble.com/hl-boundaryScanner-and-hl-bs-chars-tp3615838p3615838.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: hl.boundaryScanner and hl.bs.chars

Posted by meghana <me...@amultek.com>.
Thans iorixxx and Koji for your reply ,

so can i fulfill my needed requirement by using hl.regex.pattern and making
hl.fragmenter=regex ?? 
i was watching on these fields on wiki. i am thinking to use it to make my
highlighted text show in my desire format. 

my string is like below 
1s: This is very nice day. 3s: Christmas is about to come 4s: and christmas
preparation is just on 

now if i search with "chirstmas" , i want my fragment in below format

<str>
3s: <em>Christmas</em> is about to come 
</str>
<str>
4s: and <em>christmas</em> preparation is just on 
</str>

can i fulfill this using hl.regex.pattern ? or by any other way?? 
Thanks
Meghana

--
View this message in context: http://lucene.472066.n3.nabble.com/hl-boundaryScanner-and-hl-bs-chars-tp3615838p3616218.html
Sent from the Solr - User mailing list archive at Nabble.com.

Was:Re: hl.boundaryScanner and hl.bs.chars [off topic]

Posted by Tanguy Moal <ta...@gmail.com>.
Dear list,
I'd like to bounce on that issue...

IMHO, configuration parsing could be a little bit stricter... At  least, 
what stands for a "severe" configuration error could be user-defined.

Let me give some examples that are common errors and that don't trigger 
the "abortOnConfigurationError" behaviour, while it's set to true.

* In schema.xml, one can set the attribute multivalued="true" or 
multiValude="true", and that won't trigger any startup error.
* In solrconfig.xml, it's even possible to declare configuration objects 
(such as fragListBuilder nodes) although solr 1.4 doesn't know anything 
about such a thing.

I've experienced both worlds in my short life : strict configuration 
parsers which get really painful to maintain when configuration becomes 
complex, and loose parsers which are so nice with configuration errors 
that sometimes a simple typo error gets hard to be spotted out (even if 
the multivalued="true" error is usually easy to find, as soon as one 
adds several values to a non multi-valued field :), the highlighting 
issue requires people to pay more attention to the "/!\ SolrX.Y" 
mentions on the wiki... BTW, http://wiki.apache.org/solr/Solr3.5's 
content seems outdated, I think it was released a month ago or so... 
Kudos! ;-) )

The point here is that, from my point of view, the 
abortOnConfigurationError flag is actually of little help when playing 
around with the configuration (at least without the ability to define 
what a severe configuration error is)

Thank you for your attention!

--
Tanguy

Le 28/12/2011 09:43, Koji Sekiguchi a écrit :
> (11/12/28 17:08), Ahmet Arslan wrote:
>> FastVectorHighlighter requires Solr3.1
>>
>> http://wiki.apache.org/solr/HighlightingParameters#hl.useFastVectorHighlighter 
>>
>>
>
> Right. In addition, baoundaryScanner requires 3.5.
>
> koji


Re: hl.boundaryScanner and hl.bs.chars

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(11/12/28 17:08), Ahmet Arslan wrote:
> FastVectorHighlighter requires Solr3.1
>
> http://wiki.apache.org/solr/HighlightingParameters#hl.useFastVectorHighlighter
>

Right. In addition, baoundaryScanner requires 3.5.

koji
-- 
http://www.rondhuit.com/en/

Re: hl.boundaryScanner and hl.bs.chars

Posted by Ahmet Arslan <io...@yahoo.com>.
> I tried by adding BoundaryScanner in my
> solrconfig.xml  and set
> hl.useFastVectorHighlighter=true, termVectors=on,
> termPositions=on and
> termOffsets=on. in my query. then also i didn't get any
> effect on my
> highlighting. 

> do i missing anything , or doing anything wrong?? 
> i like to make a note that i am using solr version 1.4 

FastVectorHighlighter requires Solr3.1

http://wiki.apache.org/solr/HighlightingParameters#hl.useFastVectorHighlighter

Re: hl.boundaryScanner and hl.bs.chars

Posted by meghana <me...@amultek.com>.
Hi Kogi , 
Thanks for reply. 

I tried by adding BoundaryScanner in my solrconfig.xml  and set
hl.useFastVectorHighlighter=true, termVectors=on, termPositions=on and
termOffsets=on. in my query. then also i didn't get any effect on my
highlighting. 

my solr config setting is as below 
<boundaryScanner name="default" 
                        default="true" 
                        class="solr.highlight.SimpleBoundaryScanner">
        <lst name="defaults">
           <str name="hl.bs.maxScan">10</str>
           <str name="hl.bs.chars">s:</str>
         </lst>
       </boundaryScanner>

do i missing anything , or doing anything wrong?? 
i like to make a note that i am using solr version 1.4 

Thanks 
Meghana

--
View this message in context: http://lucene.472066.n3.nabble.com/hl-boundaryScanner-and-hl-bs-chars-tp3615838p3615940.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: hl.boundaryScanner and hl.bs.chars

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(11/12/28 15:29), meghana wrote:
> Hi all ,
>
> i seen hl.boundaryScanner and hl.bs.chars parameters in solr highlighting
> feature. but i didn't get its meaning exactly , what its use and how can i
> use it in my search?
>
> My need is something like ,i want to set my fragment to start and end from
> special character / string that i can specify and can set fragment length
> dynamic (if possible) .

See solrconfig.xml in example:

       <boundaryScanner name="default"
                        default="true"
                        class="solr.highlight.SimpleBoundaryScanner">
	<lst name="defaults">
           <str name="hl.bs.maxScan">10</str>
           <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
         </lst>
       </boundaryScanner>

hl.bs.chars is effective only when SimpleBoundaryScanner is used.
SimpleBoundaryScanner scans stored data to backward and forward when creating
a snippet, until a character listed in hl.bs.chars.

Those features are effective for FastVectorHighlighter only.

koji
-- 
http://www.rondhuit.com/en/