Index: trunk/gsdl3/src/java/org/greenstone/gsdl3/service/AbstractMGPPSearch.java
===================================================================
--- trunk/gsdl3/src/java/org/greenstone/gsdl3/service/AbstractMGPPSearch.java	(revision 13126)
+++ trunk/gsdl3/src/java/org/greenstone/gsdl3/service/AbstractMGPPSearch.java	(revision 13127)
@@ -68,4 +68,5 @@
     private static final String FIELD_STEM_PARAM = "fqs";
     private static final String FIELD_CASE_PARAM = "fqc";
+    private static final String FIELD_ACCENT_PARAM="fqa";
     private static final String FIELD_FIELD_PARAM = "fqf";
     private static final String FIELD_COMBINE_PARAM = "fqk";
@@ -73,4 +74,6 @@
     private static final String FIELD_COMBINE_PARAM_OR = "1";
     private static final String FIELD_COMBINE_PARAM_NOT = "2";
+   
+    private static final String ACCENT_PARAM="accent";
 
     // some stuff for config files
@@ -84,4 +87,7 @@
     protected static final String LEVEL_ELEM = "level";
 
+    protected static final String STEMINDEX_OPTION = "stemIndexes";
+    protected static final String MAXNUMERIC_OPTION = "maxnumeric";
+
     protected static final String EQUIV_TERM_ELEM = "equivTerm";
 
@@ -106,4 +112,12 @@
     private boolean advanced_form_search = false;
 
+    // stem indexes available
+    private boolean does_case=true;
+    private boolean does_stem=true;
+    private boolean does_accent=false;
+    
+    // maxnumeric - not used yet. needs to be passed to MGPPWrapper.
+    private int maxnumeric = 4;
+
     /** the stem used for the index files */
     protected String index_stem = null;
@@ -142,6 +156,36 @@
 	}
 	if (this.index_stem == null || this.index_stem.equals("")) {
-	    logger.error("AbstractMGPPSearch.configure(): indexStem element not found, stem will default to collection name");
+	    logger.warn("AbstractMGPPSearch.configure(): indexStem element not found, stem will default to collection name");
 	    this.index_stem = this.cluster_name;
+	}
+
+	// get index options
+	Element index_option_list = (Element) GSXML.getChildByTagName(info, GSXML.INDEX_OPTION_ELEM + GSXML.LIST_MODIFIER);
+	if (index_option_list != null) {
+	    NodeList options = index_option_list.getElementsByTagName(GSXML.INDEX_OPTION_ELEM);
+	    for (int i=0; i<options.getLength(); i++) {
+		Element opt = (Element)options.item(i);
+		String name = opt.getAttribute(GSXML.NAME_ATT);
+		String value = opt.getAttribute(GSXML.VALUE_ATT);
+		if (name.equals(MAXNUMERIC_OPTION)) {
+		    int maxnum = Integer.parseInt(value);
+		    if (4 <= maxnum && maxnum < 512) {
+			maxnumeric = maxnum;
+		    }
+		}
+		else if (name.equals(STEMINDEX_OPTION)) {
+		    int stemindex = Integer.parseInt(value);
+		    // stem and case are true by default, accent folding false by defualt
+		    if ((stemindex & 1) == 0) {
+			does_case = false;
+		    }
+		    if ((stemindex & 2) == 0) {
+			does_stem = false;
+		    }
+		    if ((stemindex & 4) != 0) {
+			does_accent = true;
+		    }
+		}
+	    }
 	}
 
@@ -295,9 +339,16 @@
 		param_list.appendChild(multiparam);
 		
-		createParameter(FIELD_COMBINE_PARAM, multiparam,  lang);
-		createParameter(FIELD_QUERY_PARAM, multiparam,  lang);
-		createParameter(FIELD_CASE_PARAM, multiparam,  lang);
-		createParameter(FIELD_STEM_PARAM, multiparam,  lang);
-		createParameter(FIELD_FIELD_PARAM, multiparam,  lang);    
+		createParameter(FIELD_COMBINE_PARAM, multiparam, lang);
+		createParameter(FIELD_QUERY_PARAM, multiparam, lang);
+		if (this.does_case) {
+		    createParameter(FIELD_CASE_PARAM, multiparam, lang);
+		}
+		if (this.does_stem) {
+		    createParameter(FIELD_STEM_PARAM, multiparam, lang);
+		}
+		if (this.does_accent) {
+		    createParameter(FIELD_ACCENT_PARAM, multiparam, lang);
+		}
+		createParameter(FIELD_FIELD_PARAM, multiparam, lang);    
 		
 	    } 
@@ -311,9 +362,15 @@
     {
 	createParameter(LEVEL_PARAM, param_list, lang);
-	createParameter(CASE_PARAM, param_list, lang);
-	createParameter(STEM_PARAM, param_list, lang);
+	if (this.does_case){
+	    createParameter(CASE_PARAM, param_list, lang);
+	}
+	if (this.does_stem){
+	    createParameter(STEM_PARAM, param_list, lang);
+	}
+	if (this.does_accent){
+	    createParameter(ACCENT_PARAM, param_list, lang);
+	}
 	createParameter(MATCH_PARAM, param_list, lang);
 	createParameter(RANK_PARAM, param_list, lang);
-
     }
 
@@ -341,5 +398,5 @@
 	    
 	    
-	} else if (name.equals(FIELD_CASE_PARAM) || name.equals(FIELD_STEM_PARAM)) {
+	} else if (name.equals(FIELD_CASE_PARAM) || name.equals(FIELD_STEM_PARAM) || name.equals(FIELD_ACCENT_PARAM)) {
 	    String[] bool_ops = {"0", "1"};
 	    String[] bool_texts = {getTextString("param.boolean.off", lang, "AbstractSearch"),getTextString("param.boolean.on", lang, "AbstractSearch")}; 
