我希望以特定格式突出显示 solr。
以下是我需要为其提供突出显示功能的字符串格式
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.
用户搜索后,我想提供以下格式的用户片段
Previous Line of Highlight + Line containing Highlight + Next Line of
Highlight
为了。例如,用户搜索词 hear ,然后一个典型的高亮片段应该如下所示
<str>143s: WHAT IS THAT? 144s: <em>HEAR</em> THAT? 152s: EVERYBODY, SHH.
SHH.</str>
以上是我的最终计划,但现在我正在尝试获取以 ns 开头的片段,其中 n 是 0 到 9999 之间的数字
我使用 hl.regex.slop = 0.6 而我的 hl.fragsize=120 及以下是正则表达式。
\b(?=\s*\d{1,4}s:){50,200}
使用上面的正则表达式我的片段总是不以 ns 开头:
请就此提出建议,我怎样才能实现最终计划
谢谢