Changeset 29330 for main/trunk/gli/src

Show
Ignore:
Timestamp:
23.09.2014 18:30:02 (5 years ago)
Author:
ak19
Message:

Commit 28312 had broken the indexers tutorial: casefolding and stemming and accentfolding were no longer available in the search forms for an MGPP collection. This happened in GLI, since the indexOptions for stemming, accentfolding and casefolding were no longer preserved. Kathy said indexOptions should not be written out for lucene and solr since they made no sense in lucene or solr collections. This fix preserves the indexOptions in mgpp and mg.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfigXMLReadWrite.java

    r29312 r29330  
    24072407        { 
    24082408            DebugStream.println("There should be an IndexOption element which is assigned 'true': possible bug."); 
    2409             return; 
     2409 
     2410            // for lucene and solr collections, don't write out stemming, casefolding and accentfolding indexOptions 
     2411            // since they are not meant to be editable: stemming and casefolding are always on in lucene 
     2412            String buildtype_value = search.getAttribute(StaticStrings.TYPE_ATTRIBUTE); //might be mg|mgpp|lucene|solr 
     2413            if(buildtype_value.equalsIgnoreCase("solr") || buildtype_value.equalsIgnoreCase("lucene")) { 
     2414                return; 
     2415            } 
    24102416        }  
    24112417        //Element indexOptionEl = to.createElement(StaticStrings.INDEXOPTION_STR);