Class DefaultSummarizer
- java.lang.Object
-
- com.atlassian.confluence.internal.search.v2.lucene.summary.DefaultSummarizer
-
- All Implemented Interfaces:
Summarizer
public class DefaultSummarizer extends Object implements Summarizer
Originally from org.apache.nutch.searcher.Summarizer v 0.7 (Revision: 179640) Implements hit summarization using a sliding window and various document fragments.- Since:
- 8.0
-
-
Constructor Summary
Constructors Constructor Description DefaultSummarizer(org.apache.lucene.analysis.Analyzer analyzer)
DefaultSummarizer(org.apache.lucene.analysis.Analyzer analyzer, int sumContext, int sumLength, ILuceneConnection luceneConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Summary
getSummary(String text)
Summary
getSummary(String text, String query)
Returns a summary for the given pre-tokenized text.
-
-
-
Constructor Detail
-
DefaultSummarizer
public DefaultSummarizer(org.apache.lucene.analysis.Analyzer analyzer)
-
DefaultSummarizer
public DefaultSummarizer(org.apache.lucene.analysis.Analyzer analyzer, int sumContext, int sumLength, ILuceneConnection luceneConnection)
-
-
Method Detail
-
getSummary
public Summary getSummary(String text) throws IOException
- Specified by:
getSummary
in interfaceSummarizer
- Throws:
IOException
-
getSummary
public Summary getSummary(String text, String query) throws IOException
Description copied from interface:Summarizer
Returns a summary for the given pre-tokenized text.- Specified by:
getSummary
in interfaceSummarizer
- Parameters:
text
- a pre-tokenized text.query
- the supplied query- Returns:
- summary for the given pre-tokenized text.
- Throws:
IOException
-
-