Java FastVectorHighlighter短语突出显示不使用词干分析

Java FastVectorHighlighter短语突出显示不使用词干分析,java,solr,lucene,stemming,fast-vector-highlighter,Java,Solr,Lucene,Stemming,Fast Vector Highlighter,试图在存储词干和原始单词时编写词干分析器会导致使用FastVectorHighlighter突出显示短语时出现一些问题 输入字符串是foobarbaz,其中ba是bar的词干。下图说明了分析 短语搜索会产生匹配项,但根本没有突出显示 http://localhost:8080/solr/select ?q="foo bar baz" &qf=text &hl.requireFieldMatch=true &hl.fl=text &h

试图在存储词干和原始单词时编写词干分析器会导致使用
FastVectorHighlighter
突出显示短语时出现一些问题

输入字符串是
foobarbaz
,其中
ba
bar
的词干。下图说明了分析

短语搜索会产生匹配项,但根本没有突出显示

http://localhost:8080/solr/select
   ?q="foo bar baz"
   &qf=text
   &hl.requireFieldMatch=true
   &hl.fl=text
   &hl.usePhraseHighlighter=true
   &hl.boundaryScanner=breakIterator
   &hl.useFastVectorHighlighter=true
   &hl=true
   &defType=edismax
其中
hl.bs.type=WORD
boundayScanner
使用

这两种方法,
hl.useFastVectorHighlighter=false
和查询中的引号都会导致所有术语高亮显示

正在使用Solr 3.6.2,字段定义如下

<field name="text" type="text" indexed="true" stored="true" 
     multiValued="true" termVectors="true" 
     termPositions="true" termOffsets="true"/>

并分析为

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
    <analyzer>
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="my.custom.StemmerFactory" preserveOriginal="true"/>
    </analyzer>
</fieldType>

结果是
hl.fragSize
没有设置足够大的值来包含整个高亮显示的序列。愚蠢的问题往往是最糟糕的