Changeset 4215 for trunk/indexers/mgpp
- Timestamp:
- 2003-05-01T12:05:32+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/indexers/mgpp/java/org/greenstone/mgpp/Queryer.java
r3446 r4215 4 4 import java.io.BufferedReader; 5 5 import java.io.InputStreamReader; 6 6 import java.io.File; 7 7 /** Queryer - java port of c++ Queryer 8 8 * - uses MGPPWrapper to access mgpp … … 49 49 String index_path = args[1]; 50 50 51 text_path = base_dir + File.separatorChar+text_path; 52 index_path = base_dir + File.separatorChar+ index_path; 53 51 54 // the jni class to access mgpp stuff 52 55 MGPPWrapper wrapper = new MGPPWrapper(); 53 wrapper.loadIndexData( base_dir,index_path);56 wrapper.loadIndexData(index_path); 54 57 55 58 // the return level … … 91 94 case 'p': // print doc 92 95 int docnum = Integer.parseInt(data); 93 String doc = wrapper.getDocument( base_dir,text_path,96 String doc = wrapper.getDocument(text_path, 94 97 level, docnum); 95 98 System.out.println(doc); … … 160 163 wrapper.runQuery(command); 161 164 MGPPQueryResult res = wrapper.getQueryResult(); 162 if ( shortOutput) {163 System.out.println( res.toShortString());165 if (res.hasSyntaxError()) { 166 System.out.println("invalid syntax error\n"); 164 167 } else { 165 System.out.println(res.toString()); 168 if (shortOutput) { 169 System.out.println(res.toShortString()); 170 } else { 171 System.out.println(res.toString()); 172 } 166 173 } 167 174 }
Note:
See TracChangeset
for help on using the changeset viewer.