Changeset 8954
- Timestamp:
- 2005-02-02T14:46:07+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java
r8723 r8954 75 75 private static final String SEARCH_TYPE_PLAIN = "plain"; 76 76 private static final String SEARCH_TYPE_FORM = "form"; 77 77 private static final String SEARCH_TYPE_FORM_SIMPLE = "simple"; 78 78 private static final String SEARCH_TYPE_FORM_ADVANCED = "advanced"; 79 79 … … 88 88 // the default level for retrieval - and we'll use it for searching too 89 89 private String default_level=null; 90 // the default field for searching 91 private String default_field = null; 90 92 // which search services will we offer?? 91 93 private boolean plain_search = false; … … 97 99 { 98 100 this.mgpp_src = new MGPPWrapper(); 101 this.dictionary_name = "MGPPSearch"; 99 102 } 100 103 … … 176 179 return true; 177 180 } 181 // find the default field - use the first one 182 Element first_field = (Element)GSXML.getChildByTagName(field_list, GSXML.FIELD_ELEM); 183 default_field = first_field.getAttribute(GSXML.NAME_ATT); 178 184 // else set up the fielded query services 179 185 … … 460 466 } 461 467 462 // If a n field hasn't been specified, use all fields468 // If a field hasn't been specified, use the default 463 469 String field = (String) params.get(INDEX_FIELD_PARAM); 464 470 if (field == null) { 465 field = "ZZ";471 field = default_field; 466 472 } 467 473
Note:
See TracChangeset
for help on using the changeset viewer.