lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject spellcheck - additional setter methods
Date Tue, 27 Mar 2007 09:38:28 GMT
Hi spellcheck developers,

as users might not always have the administrative power to change
their ulimit settings (on *nix systems), it might be useful to include 
two new parameters 
indexMergeFactor and indexMaxBufferedDocs
  and their respective setter methods in


Especially, as the spellcheck just finishes with an invalid index without
any further message or warning if the ulimit settings don't suffice. 
Below is the code i would suggest.


Code changes:
first the additional attributes and setter methods:
    private int indexMergeFactor = 300;
    private int indexMaxBufferedDocs = 150;

     *  Set the merge factor for indexing; default 300
    public void setIndexMergeFactor(int mf) {
        indexMergeFactor = mf;

     *  Set max no. of docs buffered for indexing; default 150
    public void setIndexMaxBufferedDocs(int mbd) {
        indexMaxBufferedDocs = mbd;

here the changes to  public void indexDictionary (Dictionary dict) throws IOException :
replace the hard coded values



LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message