Changeset 13992


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

modify the index path

File:
1 edited

Legend:

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

    r13911 r13992  
    8888    /** lucenes rank param is based on index fields, not ranked/not */
    8989    createParameter(RANK_PARAM, param_list, lang);
     90
    9091    }
    9192   
     
    145146   
    146147    String index = "didx";
     148    String physical_index_language_name=null;
     149    String physical_sub_index_name=null;
    147150    int maxdocs = 100;
    148151    int hits_per_page = 20;
     
    181184            index = "didx";
    182185        }
    183         } // ignore any others
     186        } else if (name.equals(INDEX_SUBCOLLECTION_PARAM)) {
     187        physical_sub_index_name=value;
     188        } else if (name.equals(INDEX_LANGUAGE_PARAM)){
     189        physical_index_language_name=value;
     190        }  // ignore any others
    184191        }
    185192    // set up start and end results if necessary
     
    192199    this.lucene_src.setEndResults(end_results);
    193200   
     201
     202    if (index.equals("didx") || index.equals("didx")){
     203        if (physical_sub_index_name!=null) {
     204        index+=physical_sub_index_name;
     205        }   
     206        if (physical_index_language_name!=null){
     207        index+=physical_index_language_name;
     208        }
     209    }
     210
    194211    this.lucene_src.setIndexDir(indexdir+index);
    195212    this.lucene_src.initialise();
Note: See TracChangeset for help on using the changeset viewer.