0 down vote favorite I want solr highlight in specific format.
Below is string format for which i need to provide highlighting feature ------------------------------- 130s: LISTEN! LISTEN! 138s: [THUMP] 143s: WHAT IS THAT? 144s: HEAR THAT? 152s: EVERYBODY, SHH. SHH. 156s: STAY UP THERE. 163s: [BOAT CREAKING] 165s: WHAT IS THAT? 167s: [SCREAMING] 191s: COME ON! 192s: OH, GOD! 193s: AAH! 249s: OK. WE'VE HAD SOME PROBLEMS 253s: AT THE FACILITY. 253s: WHAT WE'RE ATTEMPTING TO ACHIEVE 256s: HERE HAS NEVER BEEN DONE. 256s: WE'RE THIS CLOSE 259s: TO THE REACTIVATION 259s: OF A HUMAN BRAIN CELL. 260s: DOCTOR, THE 200 MILLION 264s: I'VE SUNK INTO THIS COMPANY 264s: IS DUE IN GREAT PART 266s: TO YOUR RESEARCH. --------------------------- after user search I want to provide user fragment in below format *Previous Line of Highlight + Line containing Highlight + Next Line of Highlight* For. E.g. user searched for term hear , then one typical highlight fragment should be like below *<str>143s: WHAT IS THAT? 144s: <em>HEAR</em> THAT? 152s: EVERYBODY, SHH. SHH.</str>* above is my ultimate plan , but right now I am trying to get fragment as, which start with ns: where n is numner between 0 to 9999 i use hl.regex.slop = 0.6 and my hl.fragsize=120 and below is regex for that. *\b(?=\s*\d{1,4}s:){50,200} * using above regular expression my fragment always do not start with ns: Please suggest me on this , how can i achieve ultimate plan Thanks -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-customize-Fragment-using-hl-fragmenter-and-hl-regex-pattern-tp3997693.html Sent from the Solr - User mailing list archive at Nabble.com.