Changeset 7629 for trunk/indexers/mg


Ignore:
Timestamp:
2004-06-22T16:22:36+12:00 (20 years ago)
Author:
kjdon
Message:

fixed a couple of compiler warnings, also included the necessary header files, thereby fixing a BIG BUG. When trying to get lots of docs from mg, it would crap out at the seventh one. there was a method returning a double - but no header file, so it was assumed to return int. the double was not being cleared out of the floating point processor stack (circular stack with 8 spaces) and so it was overflowing after seven times - when it tried to multiply floats, it needed 2 spaces and only one was available. whew, that took ages to work out.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/indexers/mg/jni/MGWrapperImpl.c

    r4714 r7629  
    2525#include "backend.h"
    2626#include "environment.h"
    27 
     27#include "text_get.h"
     28#include "stemmer.h"
    2829
    2930/*************************************************************************
     
    408409    rqi.Sort = 1;  /* Sort the query terms by frequency before ranking */
    409410    rqi.AccumMethod = 'L';  /* Use a list when accumulating (has bugs though...) */
    410     /* rqi.MaxAccums = -1; /* Use as many accumulators as necessary - CRASHES with list */
     411    /* rqi.MaxAccums = -1; */ /* Use as many accumulators as necessary - CRASHES with list */
    411412    rqi.MaxAccums = 100000;
    412413    rqi.MaxTerms = -1;  /* Use all the query terms */
    413     /* rqi.StopAtMaxAccum = 0;  /* Don't care (using as many accumulators as necessary) */
     414    /* rqi.StopAtMaxAccum = 0;*/  /* Don't care (using as many accumulators as necessary) */
    414415    rqi.StopAtMaxAccum = 1;
    415416    rqi.HashTblSize = 1000;  /* Don't care (not using a hash table) */
     
    669670
    670671  /* Print the data to a character array */
    671   sprintf(result, "Query params:\nindex\t\t%s\ncasefold\t%d\nstem\t\t%d\nquery type\t%s\nmax docs\t%d\n",
     672  sprintf(result, "Query params:\nindex\t\t%s\ncasefold\t%d\nstem\t\t%d\nquery type\t%s\nmax docs\t%ld\n",
    672673      (data->queryInfo->index == NULL ? "<none loaded>" : data->queryInfo->index),
    673674      (data->defaultStemMethod & 1),
Note: See TracChangeset for help on using the changeset viewer.