Changeset 9874 for trunk/indexers
- Timestamp:
- 2005-05-16T11:02:50+12:00 (19 years ago)
- Location:
- trunk/indexers/mg
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/indexers/mg/java/org/greenstone/mg/MGQueryResult.java
r3794 r9874 53 53 } 54 54 55 public boolean isClear() { 56 return (total_num_docs_ == 0 && docs_.isEmpty() && terms_.isEmpty()); 57 } 55 58 56 59 /** returns the result as a String - useful for printing out results */ -
trunk/indexers/mg/jni/MGWrapperImpl.c
r8920 r9874 315 315 316 316 /* Check that the index was loaded successfully */ 317 assert(qd != NULL); 317 if (qd==NULL) { 318 return NULL; 319 } 320 /*assert(qd != NULL);*/ 318 321 319 322 /* Get the document position and length in the text file */ … … 372 375 jthrowable exc; 373 376 374 /* Make sure an index has been specified */ 375 index_path = data->queryInfo->index; 376 assert(index_path != NULL); 377 378 /* Obtain C versions of the two string parameters */ 379 base_dir = (*j_env)->GetStringUTFChars(j_env, j_base_dir, NULL); 380 if (base_dir == NULL) { 381 return; 382 } 383 text_path = (*j_env)->GetStringUTFChars(j_env, j_text_path, NULL); 384 if (text_path == NULL) { 385 (*j_env)->ReleaseStringUTFChars(j_env, j_base_dir, base_dir); 386 return; 387 } 388 389 /* Load the appropriate index for satisfying this request */ 390 qd = loadIndexData((char*) base_dir, (char*) index_path, (char*) text_path); 391 392 /* The C text strings are no longer needed */ 393 (*j_env)->ReleaseStringUTFChars(j_env, j_base_dir, base_dir); 394 (*j_env)->ReleaseStringUTFChars(j_env, j_text_path, text_path); 395 396 /* Check that the index was loaded successfully */ 397 assert(qd != NULL); 398 399 /* Remove anything hanging around from last time */ 400 FreeQueryDocs(qd); 401 377 /* First of all, clear the previous result */ 402 378 /* The result to write to */ 403 379 result_ptr = (*j_env)->GetObjectField(j_env, j_obj, FID_query_result); … … 411 387 return; 412 388 } 389 390 /* Make sure an index has been specified */ 391 index_path = data->queryInfo->index; 392 assert(index_path != NULL); 393 394 /* Obtain C versions of the two string parameters */ 395 base_dir = (*j_env)->GetStringUTFChars(j_env, j_base_dir, NULL); 396 if (base_dir == NULL) { 397 return; 398 } 399 text_path = (*j_env)->GetStringUTFChars(j_env, j_text_path, NULL); 400 if (text_path == NULL) { 401 (*j_env)->ReleaseStringUTFChars(j_env, j_base_dir, base_dir); 402 return; 403 } 404 405 /* Load the appropriate index for satisfying this request */ 406 qd = loadIndexData((char*) base_dir, (char*) index_path, (char*) text_path); 407 408 /* The C text strings are no longer needed */ 409 (*j_env)->ReleaseStringUTFChars(j_env, j_base_dir, base_dir); 410 (*j_env)->ReleaseStringUTFChars(j_env, j_text_path, text_path); 411 412 /* Check that the index was loaded successfully */ 413 if (qd == NULL) { 414 return; 415 } 416 /*assert(qd != NULL);*/ 417 418 /* Remove anything hanging around from last time */ 419 FreeQueryDocs(qd); 413 420 414 421 /* Obtain a C version of the query string */ -
trunk/indexers/mg/src/images/WIN32.MAK
r3921 r9874 156 156 157 157 mostlyclean: 158 rm -f *$o _*.c _*.o *._c *._o core core.* 158 if exist *$o del *$o 159 if exist _*.c del _*.c 160 if exist _*.o del _*.o 161 if exist *._c del *._c 162 if exist *._o del *._o 163 if exist core del core 164 if exist core.* del core.* 159 165 160 166 clean: mostlyclean 161 rm -f $(EXEC)167 if exist *$e del *$e 162 168 163 169 distclean: clean 164 rm -f ansi2knr 165 rm -f Makefile 166 170 del ansi2knr 171 167 172 maintainer-clean: distclean 168 173 @echo "This command is intended only for maintainers to use;" -
trunk/indexers/mg/src/text/win32.mak
r7585 r9874 237 237 clean: 238 238 if exist *$o del *$o 239 if exist $(EXEC) del $(EXEC)239 if exist *$e del *$e 240 240 if exist libmgtextin.lib del libmgtextin.lib 241 241 if exist libmgpass.lib del libmgpass.lib -
trunk/indexers/mg/winMake.bat
r6416 r9874 29 29 cd ..\.. 30 30 31 cd java\org\greenstone\mg 32 call winMake.bat %1 33 cd ..\..\..\.. 34 31 35 cd jni 32 36 %MAKE% %MAKE_OPTIONS% win32.mak %1 … … 40 44 41 45 :done 46 47
Note:
See TracChangeset
for help on using the changeset viewer.