a/src/query/wasatorcl.cpp b/src/query/wasatorcl.cpp
...
...
198
        } else {
198
        } else {
199
        if ((*it)->m_exclude && wasa->m_op != WasaQuery::OP_AND) {
199
        if ((*it)->m_exclude && wasa->m_op != WasaQuery::OP_AND) {
200
            LOGERR(("wasaQueryToRcl: excl clause inside OR list!\n"));
200
            LOGERR(("wasaQueryToRcl: excl clause inside OR list!\n"));
201
            continue;
201
            continue;
202
        }
202
        }
203
      // I'm not sure I understand the phrase/near detection
204
      // thereafter anymore, maybe it would be better to have an
205
      // explicit flag. Mods can only be set after a double
206
      // quote.
207
      if (TextSplit::hasVisibleWhite((*it)->m_value) || mods) {
208
203
204
      if (mods & WasaQuery::WQM_QUOTED) {
209
            Rcl::SClType tp = (mods & WasaQuery::WQM_PROX)  ?
205
            Rcl::SClType tp = (mods & WasaQuery::WQM_PROX)  ?
210
            Rcl::SCLT_NEAR :
206
            Rcl::SCLT_NEAR :
211
            Rcl::SCLT_PHRASE;
207
            Rcl::SCLT_PHRASE;
212
            nclause = new Rcl::SearchDataClauseDist(tp, (*it)->m_value,
208
            nclause = new Rcl::SearchDataClauseDist(tp, (*it)->m_value,
213
                                (*it)->m_slack,
209
                                (*it)->m_slack,
214
                                (*it)->m_fieldspec);
210
                                (*it)->m_fieldspec);
215
        } else {
211
        } else {
212
                    // If term has commas or slashes inside, take it
213
                    // as a list, turn the slashes/commas to spaces,
214
                    // leave unquoted. Otherwise, this would end up as
215
                    // a phrase query. This is a handy way to enter
216
                    // multiple terms to be searched inside a
217
                    // field. We interpret ',' as AND, and '/' as
218
                    // OR. No mixes allowed and ',' wins.
216
            Rcl::SClType tp = (*it)->m_exclude ? 
219
            Rcl::SClType tp = (*it)->m_exclude ? Rcl::SCLT_OR:
217
          Rcl::SCLT_OR:
218
            Rcl::SCLT_AND;
220
            Rcl::SCLT_AND;
219
          nclause = 
221
                    string ns = neutchars((*it)->m_value, ",");
220
          new Rcl::SearchDataClauseSimple(tp, (*it)->m_value, 
222
                    if (ns.compare((*it)->m_value)) {
221
                          (*it)->m_fieldspec);
223
                        // had ','
224
                        tp = Rcl::SCLT_AND;
225
                    } else {
226
                        ns = neutchars((*it)->m_value, "/");
227
                        if (ns.compare((*it)->m_value)) {
228
                            tp = Rcl::SCLT_OR;
229
                        }
230
                    }
231
          nclause = new Rcl::SearchDataClauseSimple(tp, ns,
232
                                                            (*it)->m_fieldspec);
222
        }
233
        }
223
        nclause->setexclude((*it)->m_exclude);
234
        nclause->setexclude((*it)->m_exclude);
224
        }
235
        }
225
236
226
        if (nclause == 0) {
237
        if (nclause == 0) {