Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.
/ offset-hl-formatter Public archive

Demonstration of using offsets in a Solr Highlighter Formatter

License

Notifications You must be signed in to change notification settings

o19s/offset-hl-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

offset highlighter concept


Deprecated With the arrival of "Packages" in Solr 8, we've moved this code over to the https://github.com/o19s/payload-component/ project.


This code demonstrates adding offsets to a highlighter formatter. You can see it in action as part of this demonstration project: https://github.com/o19s/pdf-discovery-demo/.

This plugin provides an OffsetFormatter which supports pre tags with $score, $numTokens, $endOffset, $startOffset placeholders. If these placeholders are included in the tag they will be replaced with the tokengroup score and offset for the matching text.

To build the plugin run mvn package, check out the test configuration files for an idea of how to get set up in an actual solr instance.

This component was first dreamed up at the September 2019 Lucene Hackday.

About

Demonstration of using offsets in a Solr Highlighter Formatter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages