Ignore:
Timestamp:
1999-06-16T14:03:25+12:00 (25 years ago)
Author:
sjboddie
Message:

fixed bug in isApprox and set MAXDOCS to always be 500

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/colservr/queryfilter.cpp

    r238 r273  
    1212/*
    1313   $Log$
     14   Revision 1.4  1999/06/16 02:03:25  sjboddie
     15   fixed bug in isApprox and set MAXDOCS to always be 500
     16
    1417   Revision 1.3  1999/04/19 23:56:09  rjmcnab
    1518   Finished the gdbm metadata stuff
     
    2831#include "queryinfo.h"
    2932
     33#define MAXDOCS 500 // note that maxdocs must be at least as large
     34                    // as the highest possible value of EndResults
    3035
    3136// some useful functions
     
    192197
    193198void queryfilterclass::filter (const FilterRequest_t &request,
    194                 FilterResponse_t &response,
    195                 comerror_t &err, ostream &logout) {
     199                   FilterResponse_t &response,
     200                   comerror_t &err, ostream &logout) {
    196201  outconvertclass text_t2ascii;
    197202
     
    269274
    270275  queryparams.search_index = index+subcollection+language;
    271   queryparams.maxdocs = (endresults > 100) ? endresults : 100;
     276  queryparams.maxdocs = MAXDOCS;
    272277
    273278  // do query
     
    343348
    344349  response.numDocs = queryresults.getnumdocs();
    345   response.isApprox = (queryresults.getnumdocs() != queryparams.maxdocs);
    346 }
     350  response.isApprox = (queryresults.getnumdocs() == queryparams.maxdocs);
     351}
Note: See TracChangeset for help on using the changeset viewer.