public class DefaultXMLExcerpt extends AbstractExcerpt
DefaultXMLExcerpt
creates an XML excerpt of a matching node.
<excerpt> <fragment><highlight>Jackrabbit</highlight> implements both the mandatory XPath and optional SQL <highlight>query</highlight> syntax.</fragment> <fragment>Before parsing the XPath <highlight>query</highlight> in <highlight>Jackrabbit</highlight>, the statement is surrounded</fragment> </excerpt>
index, query
REP_EXCERPT
Constructor and Description |
---|
DefaultXMLExcerpt() |
Modifier and Type | Method and Description |
---|---|
protected String |
createExcerpt(org.apache.lucene.index.TermPositionVector tpv,
String text,
int maxFragments,
int maxFragmentSize)
Creates an excerpt for the given
text using token offset
information provided by tpv . |
getExcerpt, getQueryTerms, highlight, init
protected String createExcerpt(org.apache.lucene.index.TermPositionVector tpv, String text, int maxFragments, int maxFragmentSize) throws IOException
text
using token offset
information provided by tpv
.createExcerpt
in class AbstractExcerpt
tpv
- the term position vector for the fulltext field.text
- the original text.maxFragments
- the maximum number of fragments to create.maxFragmentSize
- the maximum number of characters in a fragment.IOException
- if an error occurs while creating the excerpt.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.