protected void endAnd() { // put negative words at the end List<FulltextQuery> pos = new LinkedList<FulltextQuery>(); List<FulltextQuery> neg = new LinkedList<FulltextQuery>(); for (FulltextQuery term : terms) { if (term.op == Op.NOTWORD) { neg.add(term); } else { pos.add(term); } } if (!pos.isEmpty()) { terms = pos; terms.addAll(neg); if (terms.size() == 1) { ft.terms.add(terms.get(0)); } else { FulltextQuery a = new FulltextQuery(); a.op = Op.AND; a.terms = terms; ft.terms.add(a); } } terms = new LinkedList<FulltextQuery>(); }
FulltextQuery newFt = new FulltextQuery(); newFt.op = Op.AND; newFt.terms = newTerms;
FulltextQuery newFt = new FulltextQuery(); if (ft.op == Op.AND || ft.op == Op.OR) { List<FulltextQuery> newTerms = new LinkedList<>(); FulltextQuery sft = new FulltextQuery(); sft.op = Op.WORD; sft.word = subword;
continue; FulltextQuery w = new FulltextQuery(); if (minus) { if (word.length() == 0) {