|
|
@ -839,28 +839,17 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
text = Fts4DbHelper.breakText(text);
|
|
|
|
text = Fts4DbHelper.breakText(text);
|
|
|
|
query = Fts4DbHelper.breakText(query);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean plus = false;
|
|
|
|
|
|
|
|
boolean minus = false;
|
|
|
|
|
|
|
|
List<String> word = new ArrayList<>();
|
|
|
|
List<String> word = new ArrayList<>();
|
|
|
|
for (String w : query.trim().split("\\s+"))
|
|
|
|
for (String w : query.trim().split("\\s+"))
|
|
|
|
if ("+".equals(w))
|
|
|
|
if (w.length() > 1 && w.startsWith("+")) {
|
|
|
|
plus = true;
|
|
|
|
if (!text.contains(Fts4DbHelper.preprocessText(w.substring(1))))
|
|
|
|
else if ("-".equals(w))
|
|
|
|
return false;
|
|
|
|
minus = true;
|
|
|
|
} else if (w.length() > 1 && w.startsWith("-")) {
|
|
|
|
else {
|
|
|
|
if (!html && text.contains(Fts4DbHelper.preprocessText(w.substring(1))))
|
|
|
|
if (plus) {
|
|
|
|
return false;
|
|
|
|
if (!text.contains(w))
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
word.addAll(Arrays.asList(Fts4DbHelper.breakText(w).split("\\s+")));
|
|
|
|
} else if (minus) {
|
|
|
|
|
|
|
|
if (!html && text.contains(w))
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
} else
|
|
|
|
|
|
|
|
word.add(w);
|
|
|
|
|
|
|
|
plus = false;
|
|
|
|
|
|
|
|
minus = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (word.size() == 0)
|
|
|
|
if (word.size() == 0)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|