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/29 11:26:56 UTC

Apply regex on highlighting feature

Hi all, 

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

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 *5s:* this is awesome!!
</str>

i was watching on these fields on wiki. i am thinking to use it to make my
highlighted text show in my desire format. 

in above format. i want , my string of highlighting starts from  ns: and all
other ns: coming in the same highlight should be replaced with blank string.
as in above example yellow highlighted text (5s:). should be replaced with
blank and so should not display in my highlighted fragment result.

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/Apply-regex-on-highlighting-feature-tp3618566p3618566.html
Sent from the Solr - User mailing list archive at Nabble.com.