public boolean accepts( IndexingContext ctx, ArtifactInfo ai ) { StringBuilder sb = new StringBuilder(); for ( Field field : uniqueFields ) { sb.append( ai.getFieldValue( field ) ).append( ":" ); } String key = sb.toString().substring( 0, sb.length() - 1 ); if ( gas.contains( key ) ) { return false; } else { gas.add( key ); postprocess( ctx, ai ); return true; } }
text = ai.getFieldValue( field.getOntology() );