Ignore:
Timestamp:
2006-08-02T17:34:50+12:00 (18 years ago)
Author:
mdewsnip
Message:

Fuzzy searching with Lucene, many thanks to John Thompson and DL Consulting Ltd.

File:
1 edited

Legend:

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

    r12314 r12388  
    9090  query.maxdocs = filterOptions["Maxdocs"].defaultValue.getint();
    9191  query.level = filterOptions["Level"].defaultValue;
     92  // Lucene specific
    9293  query.sortfield = filterOptions["SortField"].defaultValue;
     94  query.fuzzysearch = (filterOptions["FuzzySearch"].defaultValue == "true");
    9395  query.maxnumeric = maxnumeric;
    9496  OptionValue_tarray::const_iterator options_here = request.filterOptions.begin();
     
    117119      query.stemming = (filterOptions["Stem"].defaultValue == "true");
    118120      query.level = filterOptions["Level"].defaultValue;
     121      // Lucene specific
    119122      query.sortfield = filterOptions["SortField"].defaultValue;
     123      query.fuzzysearch = (filterOptions["FuzzySearch"].defaultValue == "true");
    120124      query.maxnumeric = maxnumeric;
    121125      // "all", needed when combining queries where the document results are needed
     
    152156    } else if ((*options_here).name == "SortField") {
    153157      query.sortfield = (*options_here).value;
     158    } else if ((*options_here).name == "FuzzySearch") {
     159      query.fuzzysearch = ((*options_here).value == "true");
    154160    } else {
    155161      logout << text_t2ascii
Note: See TracChangeset for help on using the changeset viewer.