solr里要使用FastVectorHighlighter时须使用的配置和代码
schema.xml里配置term位置信息 <field name="text" type="text_en_splitting_tight" indexed="true" stored="true" multiValued="false" [b] termVectors="true" termPositions="true" termOffsets="true"[/b] /> 如果使用了比较智能的分词,则要在solrconfig.xml里配置breakIterator <boundaryScanner name="breakIterator" default="true" class="solr.highlight.BreakIteratorBoundaryScanner"> <lst name="defaults"> <!– type should be one of CHARACTER, WORD(default), LINE and SENTENCE –> <str name="hl.bs.type">SENTENCE</str> <!– language and country are used when constructing Locale object. –> <!– And the Locale object will be used when getting instance …