forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add checks in term and terms queries that input terms are not too long (
elastic#99818) Lucene indexes do not allow terms of greater than 32k bytes long. Any queries that contain terms that exceed this length will by definition not match anything, and can cause cluster instability by consuming large amounts of heap. They are also generally always a user error (for example, a termsquery that concatenates all its inputs into a single string rather than splitting them into json arrays). This commit adds some checking to Term and Terms query builders that will throw an exception if any of their input terms are greater than the maximum allowed length by the lucene IndexWriter. Fixes elastic#99802
- Loading branch information
1 parent
06aad5a
commit 23099a4
Showing
6 changed files
with
72 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 99818 | ||
summary: Add checks in term and terms queries that input terms are not too long | ||
area: Search | ||
type: enhancement | ||
issues: | ||
- 99802 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters