- Timestamp:
- 2018-11-20T21:34:48+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java
r32084 r32619 43 43 public class GS2MGPPSearch extends AbstractGS2FieldSearch 44 44 { 45 private static MGPPSearchWrapper mgpp_src = null; 45 private static MGPPSearchWrapper mgpp_src = null; // STATIC! 46 46 47 47 private String physical_index_name = "idx"; … … 65 65 mgpp_src.reset(); // reset stored settings to defaults 66 66 } 67 67 68 68 /** process a query */ 69 69 protected Element processAnyQuery(Element request, int query_type) 70 70 { 71 // don't know that the static (class variable) mgpp_src is "multi-threaded re-entrant" allowing multiple users 72 // to search the same index at the same time. So leave code as-is: to synchronize on mgpp_src when running query 71 73 synchronized (mgpp_src) 72 74 { … … 102 104 } 103 105 104 protected booleansetUpQueryer(HashMap<String, Serializable> params)106 protected Object setUpQueryer(HashMap<String, Serializable> params) 105 107 { 106 108 … … 199 201 mgpp_src.loadIndexData(indexdir); 200 202 201 return true; 202 } 203 204 protected Object runQuery(String query) 205 { 203 return mgpp_src; //return the query object 204 } 205 206 protected Object runQuery(Object queryObject, String query) 207 { 208 // queryObject is mgpp_src, so use mgpp_src reference directly: 209 206 210 mgpp_src.runQuery(query); 207 211 MGPPQueryResult mqr = mgpp_src.getQueryResult();
Note:
See TracChangeset
for help on using the changeset viewer.