### Description

There is a hard limit on the size of terms that can be indexed in lucene.  However, we don't check this at query time, which can lead to memory issues if the term query in question is case insensitive.  Very long terms are normally a sign of user error, so we should check up-front the length of the input and throw and exception if it is greater than `IndexWriter.MAX_TERM_LENGTH`.
server/src/test/java/org/elasticsearch/index/query/TermQueryBuilderTests.java
"term" : {
                "message1" : "this",
                "message2" : "this"
              }
            }""";
        e = expectThrows(ParsingException.class, () -> parseQuery(shortJson));
        assertEquals("[term] query doesn't support multiple fields, found [message1] and [message2]", e.getMessage());
    }
    public void testParseFailsWithMultipleValues() {
        String json = """
            {
              "term" : {
                "message1" : {
                  "value" : ["this", "that"]
                }
              }
            }""";
        ParsingException e = expectThrows(ParsingException.class, () -> parseQuery(json));
        assertEquals(
            "[term] query does not support arrays for value - use a bool query with multiple term clauses "
                + "in the should section or use a Terms query if scoring is not required",
            e.getMessage()
        );
    }
    public void testParseAndSerializeBigInteger() throws IOException {
        String json = """
            {
              "term" : {
                "foo" : {
                  "value" : 80315953321748200608