com.atlassian.confluence.search.lucene.extractor
Class LimitedTextContentExtractor

java.lang.Object
  extended by com.atlassian.bonnie.search.extractor.BaseAttachmentContentExtractor
      extended by com.atlassian.bonnie.search.extractor.DefaultTextContentExtractor
          extended by com.atlassian.confluence.search.lucene.extractor.LimitedTextContentExtractor
All Implemented Interfaces:
com.atlassian.bonnie.search.Extractor

public class LimitedTextContentExtractor
extends com.atlassian.bonnie.search.extractor.DefaultTextContentExtractor

A subclass of Bonnie's DefaultTextContentExtractor which places a limit on how many bytes of the input stream are read into memory. This prevents it from potentially reading in huge attachment streams that trigger memory starvation. This may have the side-effect of some content not being indexed if it is to be found "beyond" the limit, but that's preferable to an OOME.

Since:
v5.4

Constructor Summary
LimitedTextContentExtractor()
           
 
Method Summary
protected  java.lang.String extractText(java.io.InputStream is, com.atlassian.bonnie.search.SearchableAttachment attachment)
           
 
Methods inherited from class com.atlassian.bonnie.search.extractor.DefaultTextContentExtractor
shouldExtractFrom
 
Methods inherited from class com.atlassian.bonnie.search.extractor.BaseAttachmentContentExtractor
addFields, getMatchingContentTypes, getMatchingFileExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LimitedTextContentExtractor

public LimitedTextContentExtractor()
Method Detail

extractText

protected java.lang.String extractText(java.io.InputStream is,
                                       com.atlassian.bonnie.search.SearchableAttachment attachment)
Overrides:
extractText in class com.atlassian.bonnie.search.extractor.DefaultTextContentExtractor


Copyright © 2003-2014 Atlassian. All Rights Reserved.