if (ConfigurationManager.getProperty("search.maxfieldlength") != null) { int maxfieldlength = ConfigurationManager .getIntProperty("search.maxfieldlength"); if (maxfieldlength == -1) { writer.maxFieldLength = Integer.MAX_VALUE; } else { writer.maxFieldLength = maxfieldlength; } }
    private static IndexWriter openIndex(Context c, boolean wipe_existing)            throws IOException    {        IndexWriter writer;        String index_directory = ConfigurationManager.getProperty("search.dir");        writer = new IndexWriter(index_directory, new DSAnalyzer(),                wipe_existing);        // Potential improvement for large indices to avoid TooManyFiles        // exception.        //writer.setUseCompoundFile(true);        return writer;    }