Changeset 13993


Ignore:
Timestamp:
2007-03-28T16:07:48+12:00 (15 years ago)
Author:
qq6
Message:

add language and subcollection parameters to index

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java

    r13916 r13993  
    9292
    9393    protected boolean setUpQueryer(HashMap params) {
    94     // set up mgpp_src
    95     String indexdir = GSFile.collectionBaseDir(this.site_home, this.cluster_name) + File.separatorChar + GSFile.collectionIndexPath(this.index_stem, this.physical_index_name);
    96     this.mgpp_src.loadIndexData(indexdir);
    9794
    9895    // set up the query params
    9996    Set entries = params.entrySet();
    10097    Iterator i = entries.iterator();
     98    String physical_sub_index_name=null;
     99    String physical_index_language_name=null;
    101100    while (i.hasNext()) {
    102101        Map.Entry m = (Map.Entry)i.next();
     
    129128            this.mgpp_src.setSortByRank(false);
    130129        }
     130        } else if (name.equals(INDEX_SUBCOLLECTION_PARAM)) {
     131        physical_sub_index_name=value;
     132        }else if (name.equals(INDEX_LANGUAGE_PARAM)){
     133        physical_index_language_name=value;
    131134        } // ignore any others
    132135    }
    133136   
     137    if (physical_index_name.equals("idx")){
     138        if (physical_sub_index_name!=null) {
     139        physical_index_name+=physical_sub_index_name;
     140        }   
     141        if (physical_index_language_name!=null){
     142        physical_index_name+=physical_index_language_name;
     143        }
     144    }
     145
     146    // set up mgpp_src
     147    String indexdir = GSFile.collectionBaseDir(this.site_home, this.cluster_name) + File.separatorChar + GSFile.collectionIndexPath(this.index_stem, physical_index_name);
     148    this.mgpp_src.loadIndexData(indexdir);
     149
     150    physical_index_name="idx";
    134151    return true;
    135152    }
Note: See TracChangeset for help on using the changeset viewer.