de67f381913ed04259243fe4f878de69af1384fc
[evergreen-equinox.git] / docs / RELEASE_NOTES_NEXT / Architecture / Malicious-search-protection.adoc
1 == Malicious Search Protection ==
2
3 Evergreen sometimes sees some "novel" query strings in the wild that
4 cause the search backend to time out or worse.  These are sometimes
5 malicious and sometimes accidental, but the effect on users is the
6 same.
7
8 The changes here improve query compilation in several respects in order
9 to reduce the chances of an overly complex query causing problems for
10 the search subsystem.
11
12 More work is done up front to simplify and combine parts of the
13 resulting SQL, allowing more work to be done closer to the data.
14 This change allows Evergreen to handle many more tested or chained
15 boolean expressions, and negated terms are now handled directly in
16 line with other adjacent terms. Phrases (exact matches) are now
17 searched for using Postgres' adjacency tsearch operator.
18
19 All of these changes work together to improve performance by getting
20 more search work done in fewer database operations while protecting
21 against certain query constructs that have caused problems in the
22 past.
23