Switch to unified view

a/src/query/wasatorcl.cpp b/src/query/wasatorcl.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: wasatorcl.cpp,v 1.8 2007-02-13 10:58:31 dockes Exp $ (C) 2006 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: wasatorcl.cpp,v 1.9 2007-06-22 06:14:04 dockes Exp $ (C) 2006 J.F.Dockes";
3
#endif
3
#endif
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
5
 *   This program is free software; you can redistribute it and/or modify
6
 *   it under the terms of the GNU General Public License as published by
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
...
...
20
#include "wasastringtoquery.h"
20
#include "wasastringtoquery.h"
21
#include "rcldb.h"
21
#include "rcldb.h"
22
#include "searchdata.h"
22
#include "searchdata.h"
23
#include "wasatorcl.h"
23
#include "wasatorcl.h"
24
#include "debuglog.h"
24
#include "debuglog.h"
25
#include "smallut.h"
25
26
26
Rcl::SearchData *wasaStringToRcl(const string &qs, string &reason)
27
Rcl::SearchData *wasaStringToRcl(const string &qs, string &reason)
27
{
28
{
28
    StringToWasaQuery parser;
29
    StringToWasaQuery parser;
29
    WasaQuery *wq = parser.stringToQuery(qs, reason);
30
    WasaQuery *wq = parser.stringToQuery(qs, reason);
...
...
53
    case WasaQuery::OP_AND:
54
    case WasaQuery::OP_AND:
54
    default:
55
    default:
55
        // ??
56
        // ??
56
        continue;
57
        continue;
57
    case WasaQuery::OP_LEAF:
58
    case WasaQuery::OP_LEAF:
59
      // Special case for mime. Not pretty.
60
      if (!stringicmp("mime", (*it)->m_fieldspec)) {
61
      sdata->addFiletype((*it)->m_value);
62
      break;
63
      } 
64
58
        if ((*it)->m_value.find_first_of(" \t\n\r") != string::npos) {
65
        if ((*it)->m_value.find_first_of(" \t\n\r") != string::npos) {
59
        nclause = new Rcl::SearchDataClauseDist(Rcl::SCLT_PHRASE, 
66
        nclause = new Rcl::SearchDataClauseDist(Rcl::SCLT_PHRASE, 
60
                            (*it)->m_value, 0, 
67
                            (*it)->m_value, 0, 
61
                            (*it)->m_fieldspec);
68
                            (*it)->m_fieldspec);
62
        } else {
69
        } else {