Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Configuration Solr UI、突出显示和EscapeTool_Configuration_Solr_Velocity_Html Escape Characters - Fatal编程技术网

Configuration Solr UI、突出显示和EscapeTool

Configuration Solr UI、突出显示和EscapeTool,configuration,solr,velocity,html-escape-characters,Configuration,Solr,Velocity,Html Escape Characters,我正在使用默认Solr工具包中的工具“Escape tool”。我使用它来显示可能嵌入了html标记的文本字段。我在velocity UI文档级别执行此操作。也就是说,我在它显示之前就逃逸了 我想打开突出显示,并已通过solrconfig成功完成此操作: <str name="hl">false</str> <str name="hl.fl">*</str> <str name="hl.usePhraseHighlighter">tru

我正在使用默认Solr工具包中的工具“Escape tool”。我使用它来显示可能嵌入了html标记的文本字段。我在velocity UI文档级别执行此操作。也就是说,我在它显示之前就逃逸了

我想打开突出显示,并已通过solrconfig成功完成此操作:

<str name="hl">false</str>
<str name="hl.fl">*</str>
<str name="hl.usePhraseHighlighter">true</str>
<str name="hl.requireFieldMatch">true</str>
<str name="hl.regex.maxAnalyzedChars">10000</str>
<str name="hl.useFastVectorHighlighter">true</str>
false
*
符合事实的
符合事实的
10000
符合事实的
不幸的是,转义工具转义了默认标记(em),因此它并没有按照预期的方式工作。在高亮显示发生之前移动转义过程听起来像是最佳解决方案。我不太熟悉UI在输出时应用的顺序

一种方法是在插入时转义字段:使用org.apache.velocity.app.event.implement.EscapeHtmlReference。但我想知道是否有一种不修改存储内容的方法


谢谢

您可以使用不同的突出显示标记,例如在输入中使用不太可能的标记

<str name="hl.simple.pre">:-:${</str>
<str name="hl.simple.post">}:-:</str>
:-:${
}:-:
然后将其替换回您首选的突出显示标签(例如,