lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Osullivan L. <>
Subject Custom Filter Indexing Slow
Date Fri, 14 Sep 2012 09:57:40 GMT
Hi Folks,

I have a custom filter which does everything I need it to but it has reduced my indexing speed
to a crawl. Are there any methods I need to call to clear / clean things up once my script
(details below) has done it's work?



  public LCCNormalizeFilter(TokenStream input)
        this.charTermAttr = addAttribute(CharTermAttribute.class);
    public boolean incrementToken() throws IOException {
    	if (!input.incrementToken()) {
	    return false;

    	char[] buffer = charTermAttr.buffer();
    	String rawLCcallnum = new String(buffer);
    	String normalizedLCcallnum = getLCShelfkey(rawLCcallnum);
    	char[] newBuffer = normalizedLCcallnum.toCharArray();
        charTermAttr.copyBuffer(newBuffer, 0, newBuffer.length);
        return true;
View raw message